|
各种原理的网页跳转代码汇总
<一>三种网页跳转代码:
如果你要在服务器端跳转,可以这样:
Response.Redirect(www.hao51xx.com)
Response.End
如果你要在客户端跳转,可以这样:
<script language="javascript" type="text/javascript">
window.location="http: //www.hao51xx.com";;</script>
如果你要让页面显示几秒钟之后跳转,可以在html代码的<head></head>部分加上这样的代码:
<meta http-equiv="refresh" content="3; url=http://www.hao51xx.com">
(3秒钟后自动跳转到www.admin5.com)
以上三种是也比较常见,比较常用的网页跳转代码运行平台Win9x WinNT Win2000 WinME WinXP。
<二>几段简单的网页跳转代码
不隐藏转向之后的地址 代码一:
<html>
<body>
<form name=loading>
<P align=center><FONT face=Arial color=#0066ff size=2>loading...</FONT> <INPUT
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bolder; PADDING-BOTTOM: 0px; COLOR: #0066ff; BORDER-TOP-style: none; PADDING-TOP: 0px; FONT-FAMILY: Arial; BORDER-RIGHT-style: none; BORDER-LEFT-style: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-style: none"
size=46 name=chart> <BR><INPUT
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; COLOR: #0066ff; BORDER-BOTTOM: medium none; TEXT-ALIGN: center"
size=47 name=percent>
<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()",100);}
else
{window.location = "将这里改成要转入的网址";}
}</SCRIPT>
</P></form>
</body>
</html>