复制代码 代码如下:
<mce:script language="javascript"><!--
function getTimeNow() {
var time = new Date();
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();
var week; var date;
if(time.getDay()==0) week="星期日";
if(time.getDay()==1) week="星期一";
if(time.getDay()==2) week="星期二";
if(time.getDay()==3) week="星期三";
if(time.getDay()==4) week="星期四";
if(time.getDay()==5) week="星期五";
if(time.getDay()==6) week="星期六";
date=(time.getYear())+"年"+(time.getMonth()+1)+"月"+time.getDate()+"日"+" ";
document.getElementById("nowTime").innerHTML ="当前时间:"+date+week+ hour+":"+minute+":"+second;
setTimeout("getTimeNow()",1000);
}
// --></mce:script>
复制代码 代码如下:
<body> 关键地方。
<div></</div>
您可能感兴趣的文章: