<html xmlns="http://www.phpernote.com/php-template-framework/850.html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网购倒计时效果插件_B5教程网_www.bcty365.com</title>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
body{font:12px/180%;background:#fff; text-align:center;}
.timerbg{height:60px;width:980px;margin:20px auto;}
.timerbg div{font-size:20px;margin:24px auto;text-align:left;font-family:"微软雅黑","宋体";font-weight:800;}
.timerbg div span{font-size:28px;margin:0 13px;color:#D6000F;font-family:Arial;font-weight:800;}
#daoend{margin:24px 0 0 0;width:324px;color:#D6000F;font-size:22px;}
</style>
<script type="text/javascript" src="http://www.bcty365.com/statics/js/bcty365_js/jquery.min.js"></script>
</head>
<body>
<div class="timerbg">
<div id="daoend" style="display:none;">还没有开始</div>
<div id="dao">打折倒计时:<span id="RemainD"> </span>天<span id="RemainH"> </span>时<span id="RemainM"> </span>分<span id="RemainS"> </span>秒</div>
</div>
<div style="font-size:14px; clear:both; width:900; ">
<p >代码整理:<a href="http://http://www.bcty365.com" title="B5教程网" style="color:#FF0000" alt="B5教程网">B5教程网</a></p>
<p>*尊重他人劳动成果,转载请自觉注明出处!注:此代码仅供学习交流,请勿用于商业用途。</p>
<p></p>
</div>
<script type="text/javascript">
var startTime=new Date();
startTime.setFullYear(2215,12,21);
//注意:setFullYear函数的第二个参数,代表月份,其取值范围:0-11,因此如果是:2013年7月20日,则这里的参数应该是:2013,6,20
startTime.setHours(23);
startTime.setMinutes(59);
startTime.setSeconds(59);
startTime.setMilliseconds(999);
var EndTime=startTime.getTime();
function GetRTime(){
var NowTime=new Date();
var nMS=EndTime-NowTime.getTime();
var nD=Math.floor(nMS/(1000*60*60*24));
var nH=Math.floor(nMS/(1000*60*60))%24;
var nM=Math.floor(nMS/(1000*60))%60;
var nS=Math.floor(nMS/1000)%60;
if (nMS<0){
$("#dao").hide();
$("#daoend").show();
}else{
$("#dao").show();
$("#daoend").hide();
$("#RemainD").text(nD);
$("#RemainH").text(nH);
$("#RemainM").text(nM);
$("#RemainS").text(nS);
}
}
$(document).ready(function(){
var timer_rt=window.setInterval("GetRTime()",1000);
});
</script>
</body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网购倒计时效果插件_B5教程网_www.bcty365.com</title>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
body{font:12px/180%;background:#fff; text-align:center;}
.timerbg{height:60px;width:980px;margin:20px auto;}
.timerbg div{font-size:20px;margin:24px auto;text-align:left;font-family:"微软雅黑","宋体";font-weight:800;}
.timerbg div span{font-size:28px;margin:0 13px;color:#D6000F;font-family:Arial;font-weight:800;}
#daoend{margin:24px 0 0 0;width:324px;color:#D6000F;font-size:22px;}
</style>
<script type="text/javascript" src="http://www.bcty365.com/statics/js/bcty365_js/jquery.min.js"></script>
</head>
<body>
<div class="timerbg">
<div id="daoend" style="display:none;">还没有开始</div>
<div id="dao">打折倒计时:<span id="RemainD"> </span>天<span id="RemainH"> </span>时<span id="RemainM"> </span>分<span id="RemainS"> </span>秒</div>
</div>
<div style="font-size:14px; clear:both; width:900; ">
<p >代码整理:<a href="http://http://www.bcty365.com" title="B5教程网" style="color:#FF0000" alt="B5教程网">B5教程网</a></p>
<p>*尊重他人劳动成果,转载请自觉注明出处!注:此代码仅供学习交流,请勿用于商业用途。</p>
<p></p>
</div>
<script type="text/javascript">
var startTime=new Date();
startTime.setFullYear(2215,12,21);
//注意:setFullYear函数的第二个参数,代表月份,其取值范围:0-11,因此如果是:2013年7月20日,则这里的参数应该是:2013,6,20
startTime.setHours(23);
startTime.setMinutes(59);
startTime.setSeconds(59);
startTime.setMilliseconds(999);
var EndTime=startTime.getTime();
function GetRTime(){
var NowTime=new Date();
var nMS=EndTime-NowTime.getTime();
var nD=Math.floor(nMS/(1000*60*60*24));
var nH=Math.floor(nMS/(1000*60*60))%24;
var nM=Math.floor(nMS/(1000*60))%60;
var nS=Math.floor(nMS/1000)%60;
if (nMS<0){
$("#dao").hide();
$("#daoend").show();
}else{
$("#dao").show();
$("#daoend").hide();
$("#RemainD").text(nD);
$("#RemainH").text(nH);
$("#RemainM").text(nM);
$("#RemainS").text(nS);
}
}
$(document).ready(function(){
var timer_rt=window.setInterval("GetRTime()",1000);
});
</script>
</body>
</html>
转载请注明(B5教程网)原文链接::http://www.bcty365.com/content-72-19-1.html