Total Pageviews

Wednesday 17 October 2012

实现直接跳转到另一个页面 的html代码




有如下多种方法,你自己挑一个喜欢的:
1、
<meta http-equiv="refresh" content="秒; url=下一个页面">

2、
<script language="JavaScript">
<!–
var userAgent = navigator.userAgent;
var MSIEIndex = userAgent.indexOf("MSIE");
if (userAgent.indexOf("Win") != -1 &&
userAgent.indexOf("MSIE") != -1 &&
userAgent.substring((MSIEIndex + 5),(MSIEIndex + 8)) >= 5.5)
window.location.replace("http:http://www.qiujiangyue.com/http://www.qiujiangyue.com/www.iice.sov.cn");
http://www.qiujiangyue.com/http://www.qiujiangyue.com/–>
<http://www.qiujiangyue.com/script>


3、
有些人想访问网站时,直接进入某个子目录中的文件,如cgi-binhttp://www.qiujiangyue.com/leoboard.cgi,这时,你只要写一个默认的首页文件如index.htm,内容如下,就可以实现你的要求.
方法一:

<html>
<head>
<title>网页跳转<http://www.qiujiangyue.com/title>
<meta http-equiv="refresh" content="0;url=cgi-binhttp://www.qiujiangyue.com/leoboard.cgi">
<http://www.qiujiangyue.com/head>
<body>
<http://www.qiujiangyue.com/body>
<http://www.qiujiangyue.com/html>

方法二
<html>
<head>
<title>正在进入>>> Loading>>> <http://www.qiujiangyue.com/title>
<http://www.qiujiangyue.com/head>
<body bgcolor="#FFFFFF" text="#000000">
<p> <http://www.qiujiangyue.com/p><tr> <td width=724>
<p align=center><font color="red" size="2">正在进入,请等待,谢谢……<http://www.qiujiangyue.com/font><http://www.qiujiangyue.com/p><http://www.qiujiangyue.com/td><http://www.qiujiangyue.com/tr><tr>
<td width="724">
<p align=center>
<form name=loading>
<div align=center>
<p>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:rgb(124,119,119); background-color:white; padding:0px; border-style:none;">
<br> <input type=text name=percent size=46 style="color:rgb(138,134,134); text-align:center; border-width:medium; border-style:none;"><script>var bar = 0
var line = "||"
var amount ="||"
count()
function count(){
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",10);}
else
{window.location = "http:http://www.qiujiangyue.com/http://www.qiujiangyue.com/www.iice.sov.cn";}
}<http://www.qiujiangyue.com/script>

<http://www.qiujiangyue.com/body>
<http://www.qiujiangyue.com/html>