购买商品的时候的倒计时
<span id="countDown" ></span>
<script type="text/javascript">function _fresh()
{
var endtime= 1397232000000;//开始时间
var nowtime = new Date().getTime();
var leftsecond=parseInt((endtime - nowtime)/1000);
if(leftsecond<0){
leftsecond=0;
}
__d=parseInt(leftsecond/3600/24);
__h=parseInt((leftsecond/3600)%24);
__m=parseInt((leftsecond/60)%60);
__s=parseInt(leftsecond%60);
$("#countDown").html(__d+'天'+__h+'小时'+__m+'分钟'+__s+'秒');
}
_fresh();
setInterval(_fresh,1000);
</script>