87,997
社区成员




function showDate() {
function format(fs, values) {
return fs.replace(/\{(\w+)\}/g, function() {//这里能不能举例子讲解一下
return values[arguments[1]]||'';//这里能不能举例子讲解一下 比如{y}年{m}月 {y:1999,m:1}
});
}
var now = new Date();
document.write(format("{y}年{m}月{d}日 星期", {
y: now.getFullYear()
, m: now.getMonth()+1
, d: now.getDate()
}) + "日一二三四五六".charAt(now.getDay()));
}