var myDate = new Date();
var myYear = myDate.getFullYear();? // 獲取當前年份
var myMonth = myDate.getMonth() +1; // 獲取當前月份
var myDay = myDate.getDate() // 獲取當前日(1- 31)
var myHours = myDate.getHours() // 獲取當前小時(0-23)
var myMinu = myDate.getMinutes() // 獲取當前分鐘(0-59)
var mySec = myDate.getSeconds() // 獲取當前秒數(shù)(0-59)
var myWeek = myDate.getDay() ?//獲取當前星期幾(0-6,0代表星期天)