您的位置:首页 > Web前端 > JavaScript

JavaScript 各种页面跳转方法

2014-09-18 21:17 246 查看
第一种:

window.location.href="login.jsp?backurl=\"+window.location.href;


第二种:

alert("返回");
window.history.back(-1);


第三种:

window.navigate("top.jsp");


第四种:

self.location='top.htm';


第五种:

alert("非法访问!");
top.location='xx.jsp';


=====javascript中弹出选择框跳转到其他页面=====

<script language="javascript">
<!--
function logout(){
if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))...{
window.location.href="logout.asp?act=logout"
}
}
-->
</script>


=====javascript中弹出提示框跳转到其他页面=====

<script language="javascript">
<!--
function logout(){
alert("你确定要注销身份吗?");
window.location.href="logout.asp?act=logout"
}
-->
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: