js 倒计时链接

<p>---此页面将在 <span class="red" id="resultTimeLimit">10 </span>秒后自动跳转到<a href="#" class="link_red"> 双色球专区</a></p>

<script language="javascript" type="text/javascript">
 var i = 10;
 function showResultTimeLimit(forwardKey){
    document.getElementById("resultTimeLimit").innerHTML=i;
    if(i==0){
      if(forwardKey==3){
       document.location.href='/lottery/showSsqBuyLotteryTogetherOrder.htm?orderBy=progres&status=0';
      }else{
       document.location.href='/phone/lottery/ssq/index.htm';
      }
      return false;
    }
    i--;
    setTimeout("showResultTimeLimit('"+forwardKey+"')",1000);
 }
 showResultTimeLimit('${forwardKey}');
</script>

 

你可能感兴趣的:(JavaScript)