
function currentTime() {
var myDate = new Date();
return {
'fullyear': myDate.getFullYear(),
'month': myDate.getMonth(),
'd': myDate.getDate(),
'h': myDate.getHours(),
'm': myDate.getMinutes(),
's': myDate.getSeconds()
}
}
var thisTime = currentTime();
thisTime.fullyear //显示当前年份
×
打赏作者

感谢您的支持,我们会一直保持!

请土豪扫码随意打赏
打开支付宝扫一扫,即可进行扫码打赏哦
分享从这里开始,精彩与您同在
版权所有,转载注意明处:FEIBA分享博客 » 使用JS自定义日期显示脚本示例
发表评论