- 積分
- 5068
- 威望
- 5068
- 金錢
- 2878
- 最後登錄
- 2024-11-19
|
回復 3# SOSIHEAVEN - <body>
- <span id=mytime></span>
- <script type="text/javascript">
- function showLocale(objD)
- {
- var str,colorhead,colorfoot;
- var yy = objD.getYear();
- if(yy<1900) yy = yy+1900;
- var MM = objD.getMonth()+1;
- if(MM<10) MM = '0' + MM;
- var dd = objD.getDate();
- if(dd<10) dd = '0' + dd;
- str =MM + "." + dd + "." + yy;
- return(str);
- }
- function tick()
- {
- var today;
- today = new Date();
- document.getElementById("mytime").innerHTML = showLocale(today);
- window.setTimeout("tick()", 1000);
- }
- tick();
- </script>
- </body>
複製代碼 |
|