<html><body><script type="text/javascript">function CurentTime() { var now = new Date(); var year = now.getFullYear(); //年 var month = now.getMonth() + 1; //月 var day = now.getDate(); //日 var d=new Date() var weekday=new Array(7) weekday[0]="星期日" weekday[1]="星期一" weekday[2]="星期二" weekday[3]="星期三" weekday[4]="星期四" weekday[5]="星期五" weekday[6]="星期六" var hh = now.getHours(); //时 var mm = now.getMinutes(); //分 var ss = now.getSeconds(); //秒 var clock = year + "年"; clock += month + "月"; clock += day + "日 "; clock += weekday[d.getDay()] + " " return(clock); }document.getElementById('time').innerHTML="CurentTime()"</script><div id="time"></div></body></html>
添加回答
举报
0/150
提交
取消