ES6 - Date() 方法
JavaScript Date() 方法返回今天的日期和时间,不需要调用任何对象。
语法
Date()
返回值
返回今天的日期和时间。
示例
var dt = Date(); console.log("Current Date ",dt);
输出
Current Date Tue Sep 20 2016 22:24:31 GMT+0530 (India Standard Time)
JavaScript Date() 方法返回今天的日期和时间,不需要调用任何对象。
Date()
返回今天的日期和时间。
var dt = Date(); console.log("Current Date ",dt);
Current Date Tue Sep 20 2016 22:24:31 GMT+0530 (India Standard Time)
如果您发现内容有误或提出修改建议,请随时向我们发送 E-mail 邮件:
421660149@qq.com
您的建议已发送到 W3schools。