<div class="codetitle"> <span><a style="CURSOR: pointer" data="50709" class="copybut" id="copybut50709" onclick="doCopy('code50709')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code50709"> <br><br> > <script type="text/javascript"><BR> function GetTime() {<BR> FullYear();<BR> var month = time. getMonth() 1; // 月從0開始<BR> varday = time.getDate(); var hour = time.getHours();<BR> var minute = time. getMinutes();<BR> var sec = time.getSeconds();<BR> ) {<BR> timestring<BR> " hour ":0" minute ":" sec;<BR> }<BR> = year "-" month "-" day " " hour ":" minute ":" sec; <BR> }<BR> //div沒有value屬性<BR> <BR> window.setInterval("GetTime()", 1000);<BR> }<BR> </script><br><br><br> <div id="timeDiv"> <br> </div>🎜><br><br> </div>