<span id="time" style="background:red">5</span>秒之后跳转回主题列表,如果不跳转请点击
<script language="JavaScript1.2" type="text/javascript">
<script language="JavaScript1.2" type="text/javascript">
function delayURL(url) {
var delay = document.getElementById("time").innerHTML;
//alert(delay);
if(delay>0) {
delay--;
document.getElementById("time").innerHTML=delay;
} else {
window.location.href="<%=basePath%>frontboard.action";
}
setTimeout("delayURL('"+url+"')", 1000);
}
var delay = document.getElementById("time").innerHTML;
//alert(delay);
if(delay>0) {
delay--;
document.getElementById("time").innerHTML=delay;
} else {
window.location.href="<%=basePath%>frontboard.action";
}
setTimeout("delayURL('"+url+"')", 1000);
}
</script>
<a href="<%=basePath%>frontboard.action">主题列表</a>
<script language="JavaScript" type="text/javascript">
delayURL("bbs_main.jsp");
</script>
<a href="<%=basePath%>frontboard.action">主题列表</a>
<script language="JavaScript" type="text/javascript">
delayURL("bbs_main.jsp");
</script>
转载于:https://blog.51cto.com/hzywy/798178