Date()
JavaScript Date()方法返回今天的日期和时间,不需要调用任何对象。
语法 (Syntax)
Date()
返回值 (Return Value)
返回今天的日期和时间。
例子 (Example)
var dt = Date();
console.log("Current Date ",dt);
输出 (Output)
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)