JavaScript - Date

var date=new Date

var date=new Date();
var year=date.getFullYear();
var month=date.getMonth();
var week=date.getDay(); //星期
var day=date.getDate();
var hours=date.getHours();
var minutes=date.getMinutes();
var seconds=date.getSeconds();

你可能感兴趣的:(JavaScript - Date)