<div class="htmlarea"> <textarea id="runcode21824"> <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="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 모두 선택 참고: </a>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 </div>]<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>