<div class="htmlarea"> <textarea id="runcode21824"> <script language="javascript"> <!-- var now = new Date(2001,02,01,10,10,00);//在此处填写服务器当前时间即可 function CurentTime(){ var mm = now.getMinutes(); var ss = now.getTime() % 60000;ss = (ss - (ss % 1000)) / 1000; var clock = now.getHours() +':'; if (mm < 10) clock += '0'; clock += mm+':'; if (ss < 10) clock += '0'; return(clock + ss); } function refresh(){ document.getElementById("clock").innerHTML = now.getYear()+"年"+now.getMonth()+"月"+now.getDate()+"日 "+ CurentTime();now.setSeconds(now.getSeconds()+1);} setInterval('refresh()',1000); //--> </script> <div id="clock"></div> </textarea><br><input onclick="runEx('runcode21824')" type="button" value="运行代码"> <input onclick="doCopy('runcode21824')" type="button" value="复制代码"> <input onclick="doSave(runcode21824)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>