常用的页面跳转URL方法

来源:互联网 发布:风之教堂数据 编辑:程序博客网 时间:2024/05/22 15:43

1、这是最常见的ASP跳转
<%Response.Redirect("***.asp")%>

2、 javascript页面跳转
<script>window.location = "***.asp";</script>

3、页面设置跳转
<meta http-equiv="Refresh" content="5; url=http://www.go3158.com" />
content=5 '(这个是时间的秒数,可以直接设置为0)


4、通过JS跳转
<script type="text/javascript">
document.location.href = "http://www.go3158.com";
</script>

5、自动实现页面跳转的3种方法
<?
//PHP自带函数
Header("Location: http://www.go3158.com");
?>

<?
//利用meta
echo "<meta http-equiv=refresh content=/'0; url=http://www.snboke.com/'>";
?>

<?
//利用Javascript语言
echo "<script language=/'javascript/'>";
echo " location=/'http://www.go3158.com/';";
echo "</script>";
?>


6、javascript页面跳转常用代码
按钮式:
<INPUT name="pclog" type="button" value="/GO" onClick="location.href='http://www.go3158.com'">

链接式:

<a href="javascript:history.go(-1)">返回上一步</a>

<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">返回上一步</a>

直接跳转式:

<script>window.location.href='http://www.go3158.com;</script>

开新窗口:

<a href="/javascript:" onClick="window.open('http://www.go3158.com','','height=500,width=611,scrollbars=yes,status =yes')">蔬菜种子</a>


7、带进度条HTM页面跳转

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>跳转到http://www.go3158.com</title>
</head>
<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 language="javascript">
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 = "http://www.go3158.com";
}
}
</script>
</P>
</form>
</body>
</html>

原创粉丝点击