//Date类
new Date() //当前日期
new Date(milliseconds) //毫秒
new Date(dateString) //日期字符串
new Date(year, month, day, hours, minutes, seconds, milliseconds)
//方法
getFullYear(); //gets the year 返回年份
getMonth(); //gets the month 返回月份
getDate(); //gets the day of the month 返回月的某天
getDay(); //gets the day of the week 返回周的某天
getHours(); //gets the hours 返回小时
getMinutes(); //gets the minutes 返回分
getSeconds(); //gets the seconds 返回秒
getMilliseconds(); //gets the millisecounds 返回毫秒
JavaScript_Date类
猜你喜欢
转载自blog.csdn.net/linyisonger/article/details/80433859
今日推荐
周排行