为什么只有设定A1储存格,但会出现这么多个时间呢 function Appendzero(obj) { if(obj<10) return "0" +""+ obj; else return obj; } FR.CLOCK = function(cell) { var cl = $('[id^='+cell+']'); setInterval(function(){ var date=new Date();//獲取當時日期 var format=date.getFullYear()+"-"+Appendzero(date.getMonth()+1)+"-"+Appendzero(date.getDate())+" "+Appendzero(date.getHours())+" :"+Appendzero(date.getMinutes())+":"+Appendzero(date.getSeconds()); cl.html(format); },1000); } ; FR.CLOCK('A1'); |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|