明明没有写错,为什么这个js代码显示112年???
<script language="javascript" type="text/javascript">
var d, s = "";
var x = new Array("星期日", "星期一", "星期二","星期三","星期四", "星期五","星期六");
d = new Date();
s+=d.getYear()+"年"+(d.getMonth() + 1)+"月"+d.getDate()+"日 ";
s+=x[d.getDay()];
document.writeln(s);
</script>
|