网页跳转代码问题





  
javascript的自动页面跳转代码
转载于:http://www.good12345.com/index/javascript/001tiaozuang.htm
方法一(动画效果):
<html xmlns ="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" />
<title> Loading </title>
</head>

<body>

<form name ="loading" >

<p align ="center" > 正在跳转,请稍后... </p>

<p align ="center" >
<input type ="text" name ="bar" style ="border-style:none; background-color:#D3E8D0; font-weight:bold" />
<input type ="text" name ="percentage" style ="border-style:none; background-color:#FFFFFF; max-width:30px" />
</p>

<p align ="center" >
如果您的浏览器不支持跳转,请点击 <a href ="http://www.good12345.com" > 这里 </a> 手动跳转
</p>

<script language ="javascript" type ="text/javascript" >
var percent= 0 ; //百分比进度,显示在滚动条后面
var element= "||" ; //滚动条单元竖线
var elements= "||" ; //滚动条当前竖线
count(); //开始调用循环

function count(){
percent=percent+ 10 ; //每次百分比加10
elements =elements + element; //滚动条当前竖线增加一个滚动条单元竖线
document.loading.bar.value=elements; //设置窗体loading表单中bar元素的当前值
document.loading.percentage.value=percent+ "%" ; //设置窗体loading表单中percentage元素的当前值
if (percent< 99 ){ //percent小于99则继续循环
setTimeout( "count()" , 500 ); //每500ms进行一次count()
}
else {
window.location = "http://www.good12345.com" ; //percent达到100时跳转
}
}
</script>

</form>
</body>
</html>


方法二:
<html>
<head>
<meta http-equiv ="refresh" content ="3; url=http://www.good12345.com" >
</head>
<a href ="http://www.good12345.com" > 如果您的浏览器没有自动跳转,请点击这里 <a/>
</html>


*********************************************

如果有AB两个网页,我想在点击C网页上的连接后转到A网页,然后等5秒进入B网页,请给我一个代码

<meta http-equiv="refresh" content="3;url=跳转的网页">
代码插入到<dody>当中或者新建个空白页,页面里放该代码
其中的3表示3秒后跳转,如果不想让浏览着停留可以设为0.1

如果想无穷跳转,用如下代码

下载文件 点击下载此文件
  





收藏到:添加到QQ书签 百度收藏 添加到鲜果 新浪ViVi 365Key网摘 天极网摘 我摘 和讯网摘 yahoo 收藏到收客网 Digbuzz我挖网 添加到饭否 挖客 添加到google

[本日志由 Darph 于 2009-05-13 12:33 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.