倒计时跳转
$(function () { var i = 3; var intervalid; intervalid = setInterval(function () { if (i == 0) { clearInterval(intervalid); window.location.href = "javascript:;"; } $("#lblSecods").text(i - 1 >= 0 ? i - 1 : 0); i--; }, 1000); });
$(function () { var i = 3; var intervalid; intervalid = setInterval(function () { if (i == 0) { clearInterval(intervalid); window.location.href = "javascript:;"; } $("#lblSecods").text(i - 1 >= 0 ? i - 1 : 0); i--; }, 1000); });