日期:2014-05-16 浏览次数:20425 次
<script type="text/javascript">
function fresh() {
var d = "2014-05-25";
var endtime = new Date(d);
var nowtime = new Date();
var leftsecond = parseInt((endtime.getTime() - nowtime.getTime()) / 1000);
d = parseInt(leftsecond / 3600 / 24);
h = parseInt((leftsecond / 3600) % 24);
m = parseInt((leftsecond / 60) % 60);
s = parseInt(leftsecond % 60);
var td = d * 24 + h;
$("#emH").html(td);
$("#emM").html(m);
$("#emS").html(s);
if (leftsecond <= 0) {
$("#emH").html("00");
$("#emM").html("00");
$("#emS").html("00");
clearInterval(sh);
}
}
fresh();
var sh;
sh = setInterval(fresh, 1000);
</script>
<div class="hd">
<div class="floatleft clock">
<em id="emH"></em> <strong>:</strong><em id="emM"></em><strong>:</strong><em id="emS"></em>
</div>
</div>