惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Simon Willison's Weblog
Simon Willison's Weblog
B
Blog
V
Visual Studio Blog
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
博客园 - 司徒正美
博客园 - 【当耐特】
T
Tenable Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium
S
Secure Thoughts
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
IT之家
IT之家
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
PCI Perspectives
PCI Perspectives
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志
P
Privacy International News Feed
N
News and Events Feed by Topic
H
Hacker News: Front Page
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure
Google Online Security Blog
Google Online Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Heimdal Security Blog
Project Zero
Project Zero
C
CERT Recently Published Vulnerability Notes
MyScale Blog
MyScale Blog
AI
AI
月光博客
月光博客
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
TaoSecurity Blog
TaoSecurity Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
SecWiki News
SecWiki News
C
Cisco Blogs
The Last Watchdog
The Last Watchdog

博客园 - 银狐

蓝屏故障解决(经典) 生命的十字架 用户中心 - 博客园 怎样清除不干胶? 系统每次开机都自检分类 在supesite资讯页里加入画中画广告 - 银狐 - 博客园 MYSQL替换语句 如何鉴别IBM T40成色 iP1000废弃墨水吸收器已满解决方法 xp下删除vista文件夹的方法 可以绕过MYIE弹出窗口过滤的弹窗JS代码 强力逃避拦截的弹窗代码 突破网易相册的反盗链 相对路径连接access数据库 饭后八件事最谋杀健康 如何用Asp.Net来实现“网络硬盘”功能 USB2.0技术 长途每分钟只要9分钱! 宽带拨号错误详解
javascript的页面跳转代码
银狐 · 2007-09-24 · via 博客园 - 银狐

javascript的页面跳转代码

方法一(动画效果):
<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.126.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.126.com";    //percent达到100时跳转
    
}  
}
</script>
 
</form>
</body>
</html>
方法二:
<html>
<head>
<meta 
http-equiv="refresh" content="3; url=http://www.126.com">
</head>
<a 
href="http://www.126.com">如果您的浏览器没有自动跳转,请点击这里<a/>
</html>