JavaScript Date getTime()getDay() 方法用來取得一個 Date 物件從 1970-01-01 00:00:00 UTC 開始累計的毫秒數 (milliseconds),即是可以取得 Timestamp。語法:dateObj.getTime() 用法:var date = new Date(2016, 8, 10, 18, 30, 55); // 輸出 1473503455000 console.log(date.getTime());