js页面跳转常用的几种方式(转)
js页面跳转常用的几种方式
转载 2010-11-25 作者:
我要评论

window.location.href="jb51.jsp?backurl="+window.location.href;
</script>
第二种:
alert("返回");
window.history.back(-1);
</script>
第三种:
window.navigate("jb51.jsp");
</script>
第四种:
self.location='jb51.htm';
</script>
第五种:
alert("非法访问!");
top.location='jb51.jsp';
</script>
第六种:网址从传参获得并转向
function request(paras){
var url = location.href;
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");
var paraObj = {}
for (i=0; j=paraString[i]; i++){
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length);
}
var returnValue = paraObj[paras.toLowerCase()];
if(typeof(returnValue)=="undefined"){
return "";
}else{
return returnValue;
}
}
var theurl
theurl=request("url");
if (theurl!=''){
location=theurl
}
</script>
js页面跳转常用的几种方式(转)的更多相关文章
- js页面跳转常用的几种方式
第一种: <script language="javascript" type="text/javascript"> window.location ...
- jQuery Mobile页面跳转切换的几种方式
jQuery Mobile在移动开发中越来越受到欢迎. 而他的各个版本号也在持续不断的更新中.相同的我也非常喜欢它,它加快了我们开发HTML5的速度. 同一时候又具备jQuery一样的操作方法. 学起 ...
- JS页面跳转和打开新窗口方式
1.window.location.href=URL : 在本窗体打开一个新的页面,也是最常用的一种方法: 2.window.open(URL) : 在一个新的窗口打开一个新的页面: 3.loca ...
- JS实现页面跳转重定向的几种方式
1.重定向 <script language="javascript"type="text/javascript"> window.locatio ...
- asp.net 页面跳转传值的几种方式
参考地址: http://blog.csdn.net/zzzzzzzert/article/details/8486143 protected void Button1_Click(object se ...
- js页面跳转参考代码大全
整理一下JS页面跳转参考代码 第一种: <script language=/"javascript/" type=/"text/javascript/&qu ...
- 常用的JS页面跳转代码调用大全
一.常规的JS页面跳转代码 1.在原来的窗体中直接跳转用 <script type="text/javascript"> window.location.href=&q ...
- JS页面跳转代码怎么写?总结了5种方法
我们在建站时有些链接是固定的,比如客服咨询链接,一般是第三方url,如果直接加上去不太专业,那么就想着用站内的页面做跳转,跳转用js比较多,那么JS页面跳转代码怎么写呢?ytkah在网上搜索了一下,大 ...
- js页面跳转 和 js打开新窗口 方法
js页面跳转 和 js打开新窗口 方法 第一种: 第二种: 第三种: 第四种: 第五种: 1.在原来的窗体中直接跳转用 window.location.href="你所要跳转的页面" ...
随机推荐
- Java多线程系列 面试题
1. https://blog.csdn.net/jjj19891128/article/details/24393661 多线程经典面试题 2. https://blog.csdn.net/ll6 ...
- jQuery自定义美化下拉框
在线演示 本地下载
- shell 定义变量
注意定义变量的语法: var="ABC" 等号之间不能有空格,否则会报错
- castle windsor学习-----How components are created
- 翻译Lanlet2
Here is more information on the basic primitives that make up a Lanelet2 map. Read here for a primer ...
- spring学习(4)
在spring容器内拼凑bean叫做装配.装配bean的时候,需要告诉容器哪些bean以及容器如何使用依赖注入将它们配合在一起. 上下文定义文件的根元素是<beans>,<beans ...
- jQuery - 获取/设置内容和属性
获得内容 - text().html() 以及 val() 三个简单实用的用于 DOM 操作的 jQuery 方法: text() - 设置或返回所选元素的文本内容 html() - 设置或返回所选元 ...
- 机器学习(十五)— Apriori算法、FP Growth算法
1.Apriori算法 Apriori算法是常用的用于挖掘出数据关联规则的算法,它用来找出数据值中频繁出现的数据集合,找出这些集合的模式有助于我们做一些决策. Apriori算法采用了迭代的方法,先搜 ...
- wiredtiger存储引擎介绍——本质就是LSM,当然里面也可以包含btree和列存储
见:http://www.slideshare.net/profyclub_ru/4-understanding-and-tuning-wired-tiger-the-new-high-perform ...
- 纯css实现3D字体
下面分别是html,css和js代码: <div class="wrapper"> <h1 contenteditable data-heading=" ...