js倒计时


window.onload = function(){ var i = 600; var timer = setInterval(function(){ if(i== -1){ window.location.href="/test/order/result"; clearInterval(timer); }else{ document.getElementById("time").innerText = "请在"+i+"秒内支付"; --i; } },1000); }
原文地址:https://www.cnblogs.com/ushowtime/p/11810060.html