<div class="app_gifts">
<ul>
<li>
<a href="#" class="app_icon"><em class="mask60"></em><img src="images/13626335424335.jpg" width="60" height="60" />愤怒的小鸟</a>
<a href="#" class="btn">领取礼包</a><a href="#" class="btn">游戏专区</a><span></span>
</li>
</ul>
</div>
<script>
var ajaxGetTime = "2013/09/13 09:59:00";var endtime = Math.ceil(parseInt(new Date(ajaxGetTime).getTime())/1000);
var curtime = Math.ceil(parseInt(new Date().getTime())/1000);
var iTime = endtime-curtime;
var adTimer = setInterval(function(){
downcount();
}, 1000);
function downcount()
{
if(iTime < 0)
{
$(".app_gifts span").text("已过时");
clearInterval(adTimer);
}else{
iDay = parseInt(iTime/24/3600);
var leftTime = "";
if (iDay > 0)
{
leftTime += iDay + "天";
}
iHour = parseInt((iTime/3600)%24);
if (iHour > 0){
leftTime += iHour + "小时";
}
iMinute = parseInt((iTime/60)%60);
if (iMinute > 0){
leftTime += iMinute + "分钟";
}
iSecond = parseInt(iTime%60);
if (iSecond >= 0){
leftTime += iSecond + "秒";
}
$(".app_gifts span").text("还剩余"+leftTime);
iTime=iTime-1;
}
}
</script>