手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >js实现页面跳转的几种方法小结
js实现页面跳转的几种方法小结
摘要:按钮式:链接式:返回上一步返回上一步直接跳转式:window.location.href='http://www.jb51.net';开新窗...

按钮式:

<INPUT name="pclog" type="button" value="GO">

链接式:

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

直接跳转式:

<script>window.location.href='http://www.jb51.net';</script>

开新窗口:

<a href="javascript:"& gt;布丁足迹</a>

第一种:

<script language="javascript"type="text/javascript"> window.location.href="login.jsp"+window.location.href; </script>

第二种:

<scriptlanguage="javascript"> alert("返回"); window.history.back(-1); </script>

第三种:

<scriptlanguage="javascript"> window.navigate("top.jsp"); </script>

第四种:

<scriptlanguage="JavaScript"> self.location='top.htm'; </script>

第五种:

<scriptlanguage="javascript"> alert("非法访问!"); top.location='xx.jsp'; </script>

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

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

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

<scriptlanguage="javascript"> <!-- functionlogout()...{ alert("你确定要注销身份吗?"); window.location.href="logout.asp" } --> </script>

以上这篇js实现页面跳转的几种方法小结就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持查字典教程网。

【js实现页面跳转的几种方法小结】相关文章:

jQuery实现页面内锚点平滑跳转特效的方法总结

js获取滚动距离的方法

jQuery实现html表格动态添加新行的方法

JavaScript实现将UPC转换成ISBN的方法

JS实现跳转代码:多域名指向同一空间

js控制网页前进和后退的方法

jQuery实现转动随机数抽奖效果的方法

javascript去除空格方法小结

JQuery中DOM实现事件移除的方法

javascript实现在网页任意处点左键弹出隐藏菜单的方法

精品推荐
分类导航