|
<div align="center" id="time">time</div> <script language="javascript"> function time1() { var now,n,y,r,h,m,s; now=new Date(); n = now.getYear(); y = now.getMonth()+1; r = now.getDate(); h = now.getHours(); m =now.getMinutes(); s = now.getSeconds(); if(n<1900) n+=1900; if(y<10) y="0"+y; if(r<10) r="0"+r; if(h<10) h="0"+h; if(m<10) m="0"+m; if(s<10) s="0"+s; document.getElementById("time").innerHTML=""+ n + "-" + y + "-" + r + " "+ h + ":" + m + ":" + s; setTimeout("time1();", 1000); } time1(); </script> |