国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

?? ?? ??

Date ?? ??

JavaScript?? Date ??? ??? ??? ???? ? ?????.

?? ??? ??? ???? ??? ?????.

var now = new Date();
now; // Wed Jun 24 2015 19:49:22 GMT+0800 (CST)
now.getFullYear(); // 2015, 年份
now.getMonth(); // 5, 月份,注意月份范圍是0~11,5表示六月
now.getDate(); // 24, 表示24號(hào)
now.getDay(); // 3, 表示星期三
now.getHours(); // 19, 24小時(shí)制
now.getMinutes(); // 49, 分鐘
now.getSeconds(); // 22, 秒
now.getMilliseconds(); // 875, 毫秒數(shù)
now.getTime(); // 1435146562875, 以number形式表示的時(shí)間戳

?? ??? ????? ?? ?? ???? ?? ????? ???? ??? ??? ? ?? ??? ???? ?? ? ????. ?? ??? ?? ??? ?????.

??? ??? ???? Date ??? ????? ??? ??? ? ????.

var d = new Date(2015, 5, 19, 20, 15, 30, 123);
d; // Fri Jun 19 2015 20:15:30 GMT+0800 (CST)

?? ???? ?, ? ? ??? ???? ? ????. JavaScript? 0~11? ??? ????, 0? 1?, 1? 2?? ????? 6?? ????? 5? ?????! ?? ??? ?? JavaScript ????? ??? ?? ?? ????? ??? ?? ??? ?? ??????.

??? ??? ??? ???? ? ?? ??? ISO 8601 ??? ???? ???? ?? ???? ????.

var d = Date.parse('2015-06-24T19:49:22.875+08:00');
d; // 1435146562875

??? ?? Date ??? ?? ?????? ?????. ??? ?????? ?? ??? ?? ??? ? ????.

var d = new Date(1435146562875);
d; // Wed Jun 24 2015 19:49:22 GMT+0800 (CST)
<html>
<body>
<script type="text/javascript">
var d=new Date();
document.write("從 1970/01/01 至今已過(guò)去 " + d.getTime() + " 毫秒");
</script>
</body>
</html>

Time Zone

Date ??? ???? ??? ?? ???? ?? ?????. ??? ?? ??? ??? UTC ??? ?? ??? ? ????.

var d = new Date(1435146562875);
d.toLocaleString(); // '2015/6/24 下午7:49:22',本地時(shí)間(北京時(shí)區(qū)+8:00),顯示的字符串與操作系統(tǒng)設(shè)定的格式有關(guān)
d.toUTCString(); // 'Wed, 24 Jun 2015 11:49:22 GMT',UTC時(shí)間,與本地時(shí)間相差8小時(shí)

???? JavaScript?? ??? ??? ???? ??? ?????? ??? ?? ??? ?????? ???? ? ??? ??? ???? ? ??? ????. ?? ????? ?????? ?? ???? ???? ??? ? ????.

?????? ?????? ?????? 1970? 1? 1? 0? GMT ????? ????? ??? ?? ???? ?? ?? ?????. ????? ??? ???? ??? ????? ???? ? ?? ?? ???? ????? ???? ????? ??? ? ???? ??? ????. ??? ?????? ??? ???? ??? ? ??? ??? ??? ????. ???? ??.

??? ?????? ????? ???????? ?????? ?? JavaScript? ???? ?? ???? ????? ?? ???.

?? ?????? ???? ??? ?????:

if (Date.now) {
    alert(Date.now()); // 老版本IE沒(méi)有now()方法
} else {
    alert(new Date().getTime());
}
<html>
<body>
<script type="text/javascript">
var d=new Date()
var weekday=new Array(7)
weekday[0]="星期日"
weekday[1]="星期一"
weekday[2]="星期二"
weekday[3]="星期三"
weekday[4]="星期四"
weekday[5]="星期五"
weekday[6]="星期六"
document.write("今天是" + weekday[d.getDay()])
</script>
</body>
</html>


???? ??
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無(wú)標(biāo)題文檔</title> <script type="text/javascript"> var d = new Date(); document.write(d.toLocaleString()); </script> </head> <body> </body> </html>