日期:2014-05-16  浏览次数:20411 次

急求一个跳转链接的jQuery代码,5秒跳转到另一个页面
附上图片

------解决方案--------------------
setTimeout(function(){window.location="a.html";},5000);
------解决方案--------------------
引用:
setTimeout(function(){window.location="a.html";},5000);
+
------解决方案--------------------

<meta http-equiv="Refresh" content="5; url=http://your Url" /> 


------解决方案--------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Debug: Times Table 2</title>
</head>
<body>
 <script  type="text/javascript">

function delayURL(url) {
var delay = document.getElementById("time").innerHTML;
if (delay > 0) {
delay--;
document.getElementById("time").innerHTML = delay
} else {
window.top.location.href = url
}
setTimeout("delayURL('" + url + "')", 1000)
}

</script>

<span id="time" style="background: red;font-size:18px;">8</span>

秒钟之后自动跳转,如果不跳转,请点击下面链接

<a href="目标页面.jsp">主题列表</a>

<script type="text/javascript">

delayURL("http://www.baidu.com");

</script> 
</body>
</html>

------解决方案--------------------
引用:
Quote: 引用:

Quote: 引用:

没人吗?急求啊!
还有那个倒计时怎么弄?
求完整jQuery代码


不是什么东西都要用jQuery来解决


小女自学jQuery,js暂时不会


别人给的就是代码,script标签中放那些代码就行了。。下面的代码放到html页面就行了
<script>
setTimeout(function(){window.location="a.html";},5000);
</script>