js代码
html代码
$(document).ready(function() {
function jump(count, url) {
window.setTimeout(function() {
count--;
if (count > 0) {
$("span.remain-second").html(count);
jump(count,url);
} else {
//location.href = "customer/advertiserinfo/toModifyFinance.action";
location.href = url;
}
}, 1000);
}
var url = $("a.goto").attr("href");
jump(3,url);
});
html代码
<div id="mid_con">
<div id="right_con">
<div class="content_wrap">
<s:if test="%{errormessage != null}">
<span class="error3">${errormessage}</span>
</s:if>
<br />
<br />
3秒后自动跳转。当前还剩<span class="remain-second">3</span>秒
<br />
<br />
<a class="goto" name="goto_url" href="<s:property value = "goto_url" />">如果该页面3秒内无法正常跳转,请点击这里跳转</a>
</div>
</div>
</div>
<jsp:include page="enterfooter.jsp"></jsp:include>
</body>
</html>