AI智能
改变未来

默认当前日期 jQuery js


标题 默认当前日期 jQuery js

var date = new Date();var years = date.getFullYear();var months = date.getMonth() + 1;var day = date.getDate();months  = (months < 10 ? \"0\" + months : months );day= (day< 10 ? \"0\" + day: day);var newdate = years + \'/\' + months + \"/\" + day;console.log(newdate )
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » 默认当前日期 jQuery js