<!-- 获取当前的时间 -->
<script>
// Date
var d = new Date();
/* 年,月,日 */
var year = d.getFullYear();
var month = d.getMonth();
var date = d.getDate();
/* 时,分,秒,毫秒
1s =1000 millisecond
*/
var hour = d.getHours();
var minute = d.getMinutes()
var second = d.getSeconds();
var mills = d.getTime();
console.log(d);
console.log(year);
console.log(month+1) //月份是从0开始的,要加1
console.log(date)
console.log(hour)
console.log(minute)
console.log(second);
console.log(mills)
</script>