更新时间:2020-10-18 23:32:26
调用获取时间的方法如下:
var myyear = mydate.getfullyear(); //获取完整的年份(4位,1970-????) var mymonth = mydate.getmonth() + 1; //获取当前月份(0-11,0代表1月) var mytoday = mydate.getdate(); //获取当前日(1-31) var myday = mydate.getday(); //获取当前星期x(0-6,0代表星期天) var myhour = mydate.gethours(); //获取当前小时数(0-23) var myminute = mydate.getminutes(); //获取当前分钟数(0-59) var mysecond = mydate.getseconds(); //获取当前秒数(0-59)