万年历

function a(){
c=new Date();
n=c.getFullYear();
y=c.getMonth()+1;
r=c.getDate();
x=c.getDay();
h=c.getHours();
m=c.getMinutes();
x=n+"年"+y+"月"+r+"日"+","+"星期"+x+","+h+":"+m;
alert(x);
}

window.setInterval(a,2000);

posted on 2017-09-27 21:08  段了的弦  阅读(143)  评论(0编辑  收藏  举报