使用Date.UTC()方法

2017-06-15 18:55:00
admin
原创
540
<!DOCTYPE html>
<html>
<head>
    <title>Date Type Example</title>
    <script type="text/javascript">
    
        //January 1, 2000 at midnight
        var y2k = new Date(Date.UTC(2000, 0));
        alert(y2k.toUTCString());
        
        //May 5, 2005 at 5:55:55 PM GMT
        var allFives = new Date(Date.UTC(2005, 4, 5, 17, 55, 55));
        alert(allFives.toUTCString());


    </script>
</head>
<body>

</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络