第一种:
<script language="javascript" type="text/javascript">
window.location.href="login.jsp?backurl="+window.location.href;
</script>
第二种:
<script language="javascript">
alert("返回");
window.history.back(-1);
</script>
第三种:
<script language="javascript">
window.navigate("top.jsp");
</script>
第四种:
<script language="JavaScript">
self.location='top.htm';
</script>
第五种:
<script language="javascript">
alert("非法访问!");
top.location='xx.jsp';
</script>
页面停留多少秒之后跳转。。
$url = g_crm_url."/?mod=ordering_import_export&task=log";
echo "<script>setTimeout(parent_redirect('".$url."'),1000);</script>";
页面多少秒之后重置
echo "<script>setTimeout(parent_reload,2000);</script>";
页面倒计时跳转:
<html>
<head><title></title>
<script language='javascript' type='text/javascript'>
var secs =5; //倒计时的秒数
var URL ;
function Load(url){
URL =url;
for(var i=secs;i>=0;i--)
{
window.setTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
}
}
function doUpdate(num)
{
document.getElementById('ShowDiv').innerHTML = '将在'+num+'秒后自动跳转到 脚本之家' ;
if(num == 0) { window.location=URL; }
}
</script>
</head>
<body>
<div id="ShowDiv"></div>
<script language="javascript">
Load("http://www.jb51.net"); //要跳转到的页面
</script>
</body>
</html>