<div class="codetitle"> <span><a style="CURSOR: pointer" data="64973" class="copybut" id="copybut64973" onclick="doCopy('code64973')"><u>复制代幣</u></a></span>代码如下:</div> <div class="codebody" id="code64973"> <br><script type="text/javascript"> <br>$(function(){ <br>countDown("2015/9/8 11:11:59","#colockbox1"); <br>}); <br>function countDown(time,id){ <br>var day_elem = $(id).find('.day'); <br>varhour_elem = $(id).find('.hour'); <br>var minutes_elem = $(id).find('.month'); <br>var Second_elem = $(id).find('.second'); <br><br>//if(typeof end_time == "string") <br>var end_time = new Date(time).getTime(),//月份是实际月份-1 <br>sys_second = (end_time- new Date().getTime())/1000; <br>var timer = setInterval(function(){ <br>if (sys_秒 > 1) { <br>sys_秒 -= 1; <br>var day = Math.floor((sys_秒 / 3600) / 24); <br>var 時間 = Math.floor((sys_秒 / 3600) % 24); <br>var 分 = Math.floor((sys_秒 / 60) % 60); 60); <br>day_elem && $(day_elem).text(day);//计算天 <br>$(hour_elem).text(hour$( minutes_elem).text( minutes<10?"0" minutes: minutes);//计算分钟 <BR>$(second_elem).text(秒<10?"0" 秒:秒);//计算秒杀<BR>} else { <BR>clearInterval(タイマー) <BR>} <BR>}, 1000); <BR>} <BR></script> <br><br> </div>html: <br><br><div class="codetitle"><span><a style="CURSOR: pointer" data="56687" class="copybut" id="copybut56687" onclick="doCopy('code56687')">复制代<u></u></a> 代码如下:</span></div> <div class="codebody" id="code56687">< ;div class="colockbox" id="colockbox1"> <br><span class="day">00</span> <br><span class="hour">00</span> <br><span class="分">00</span> <br>00</スパン> <br> </div> <br><br> 公司了个秒杀页面,需要為一倒计時效果,特此收藏 <br><br>代码演示下劣:<br>做http://www.jb51.net/jiaoben/103648 .html<a href="http://www.jb51.net/jiaoben/103648.html" target="_blank"></a>