var timer = window.setTimeout(download,1000);
function download(){
clearTimeout(timer);
window.location="/客户端.exe";
}
② 求句html代码。5秒钟后跳转,屏幕不用显示。然后整个网页是个图片,想在图片加载后开始计时跳转的话
有个隔几秒触发的函数,暂时忘了。
③ 网页中让一个页面等待5秒中直接跳转到另一个页面的代码怎么样写
<head>里添加:
<meta http-equiv="refresh" content="5;URL=要跳到的网页">
更完善一点可以在<body>里添加
<div>5秒钟后自动跳转到<a href="跳到的网页">某某页</a></div>
④ 求代码。关于javaScript的。。实现 5 秒后跳转页面、并显示剩余秒数。。
<span id="totalSecond">5</span>
<!--定义js变量及方法-->
<script language="javascript" type="text/javascript">
var second = document.getElementById('totalSecond').textContent;
if (navigator.appName.indexOf("Explorer") > -1)
{
second = document.getElementById('totalSecond').innerText;
} else
{
second = document.getElementById('totalSecond').textContent;
}
setInterval("redirect()", 1000);
function redirect()
{
if (second < 0)
{
<!--定义倒计时后跳转页面-->
location.href = 'default.aspx';
} else
{
if (navigator.appName.indexOf("Explorer") > -1)
{
document.getElementById('totalSecond').innerText = second--;
} else
{
document.getElementById('totalSecond').textContent = second--;
}
}
}
</script>
css html自己加里
⑤ html制作,点击按钮在页面上显示文字5秒后跳转网页
为什么没人回答,如下代码可以实现:
<html>
<head>
<scriptlanguage="javascript">
functionasd(count,url){
document.getElementById("div1").style.display="block";
varsp=document.getElementById('sp');
sp.innerHTML=count;
if(--count>0)
setTimeout("asd("+count+",'"+url+"')",1000);
else
location.href=url;
}
</script>
</head>
<body>
<inputtype="button"onclick="asd(5,'http://www..com/');"value="点击跳转"/>
<divid="div1"style="display:none;"><spanid="sp"></span>秒后跳转</div>
</body>
</html>
⑥ 求(1-5秒随机)网页跳转代码,有木有
<script>
var vNum = Math.round( Math.random()*5);
var inter = setInterval("fun()",vNum );
function fun(){
window.location="aaa.html";
}
</script>
⑦ 求倒数5秒的网页特效 5秒后跳转新页面 在线等
content="5 是你设置的时间
<html>
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5;url=http://你要跳转地址">
<title>404出错啦!!!</title>
<style type="text/css">
<!--
.STYLE10 {font-size: 16px; color: #FF0000; font-family: "微软雅黑"; }
-->
</style>
</head>
<body>
<p></p>
<p align="center"><img src="404图片.gif" alt="404" width="512" height="312" longdesc="http://地址"> </p>
<p align="center" class="STYLE10">您所访问的页面不存在或已被作者转移,现转入首页,请稍后...</p>
<p align="center"><span class="STYLE10">若您的浏览器不支持自动跳转,<a href="http://地址" target="_self" style="color:#FF3300"><strong>请点击这里</strong></a></span></p>
</body>
</html>
⑧ 使网页延迟5秒钟跳转的asp代码如何编写
可用以下三种方法之一实现网页定时跳转:
方法一:用纯ASP代码实现
dim nowtime
nowtime=NOW()
do while datediff("s",nowtime,NOW())<5
loop
reponse.redrect "要跳转的页面"
方法二:用JS实现
<script language="javascript" type="text/javascript">
setTimeout("javascript:location.href='要跳转的页面'", 5000);
</script>
方法三:在网页的<head>和</head>之间加上以下语句
<meta http-equiv="refresh" content="5;url=要跳转的页面">
⑨ htm 等待5秒之后跳转代码
<meta http-equiv=refresh content="5;url=http://www.zlongfa.com">
这段代码直接放在head中间即可
这样做的好处是可以设定跳转时间 content="5 这个5就是5秒的意思。