标签:div span date date() style new ber blog index
var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; var date = new Date(); var day = date.getDate(); var monthIndex = date.getMonth(); var year = date.getFullYear(); console.log(day, monthNames[monthIndex], year); document.write(day + ‘ ‘ + monthNames[monthIndex] + ‘ ‘ + year);
请将 monthNames 中的数组改为你想要的
标签:div span date date() style new ber blog index
原文地址:http://www.cnblogs.com/funnyweb/p/6197038.html