<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>var hour_elem = $(id).find('.hour'); <br>var Minute_elem = $(id).find('.분'); <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- 새로운 날짜().getTime())/1000; <br>var 타이머 = setInterval(function(){ <br>if (sys_second > 1) { <br>sys_second -= 1; <br>var day = Math.floor((sys_second / 3600) / 24); <br>var hour = Math.floor((sys_second / 3600) % 24); <br>var hour = Math.floor((sys_second / 60) % 60) <br>var second = Math.floor(sys_second % 60); <br>day_elem && $(day_elem).text(day);//计算天 <br>$(hour_elem).text(hour<10?"0" hour:hour);//计算小时 <BR>$(분_elem).text(분<10?"0" 분:분);//计算分钟 <BR>$(second_elem).text(초<10?"0" 초:초);//计算秒杀<BR>} else { <BR>clearInterval(타이머) <BR>} <BR>}, 1000); <BR>} <BR></script> <br> </div> <br>html: <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"> <br>< ;div class="colockbox" id="colockbox1"> <br><span class="day">00</span> <br><span class="hour">00</span> <br><span class="분">00</span> <br><span class="second">00</span> <br></div> <br> </div> <br>공주做了个秒杀页face 需要做一个倒计时效果,特此收藏 <br><br>代码演示下载:<a href="http://www.jb51.net/jiaoben/103648.html" target="_blank">http://www.jb51. net/jiaoben/103648 .html</a>