window.location.href 和self.location的区别
你从字面上就可以理解到 window 指的是当前窗口 而 self 指的是自己 在HTML 中 由于页面可以镶嵌页面 所以这2个就有了 区别 比如说 我有个页面A.HTML 里面嵌套了一个B.HTML 在A中使用 window.location 跳转 就把整个 页面跳转了 而在 A中镶嵌B页面的位置 使用了 self跳转 就只是把B界面跳转了 A页面其他地方没有变化 就拿 很简单的 百度搜索页面来比 你输入不同的搜索内容 变化的只是下面的内容 而搜索栏本身没有变化 就是self实现下面的跳转
window.location.href 和self.location的区别的更多相关文章
- window.location.href和document.location.href、document.URL的区别
1.document表示的是一个文档对象,window表示的是一个窗口对象,一个窗口下可以有多个文档对象. 所以一个窗口下只有一个window.location.href,但是可能有多个documen ...
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
location.href 和 window.location.href 区别: 1.location.href 可以直接跳转其他地址(不属于本项目) 也可以跳转本项目中的 2.window.loca ...
- 关于location.href几种用法的区别
常见的几种开发形式: self.location.href; window.location.href; this.location.href; location.href; parent.locat ...
- window.location和window.location.href和document.location的关系
1,首先来区分window.location和window.location.href. window.location.href是一个字符串. 而window.location是一个对象,包含属性有 ...
- window.location.href 和 document.location.href
document表示的是一个文档对象,window表示的是一个窗口对象,一个窗口下可以有多个文档对象. 所以一个窗口下只有一个window.location.href,但是可能有多个document. ...
- location和location.href跳转url的区别
使用 location = url 跳转,如果本地之前已经载入过该页面并有缓存,那么会直接读取本地的缓存,缓存机制是由本地浏览器设置决定的.状态码为: 200 OK (from cache) . ...
- location.replace()和location.href=进行跳转的区别
location.href 通常被用来跳转到指定页面地址;location.replace 方法则可以实现用新的文档替换当前文档;location.replace 方法不会在 history 对象中生 ...
- js中top.location.href、parent.location.href用法
window.location.href.location.href是本页面跳转 parent.location.href是上一层页面跳转 top.location.href是最外层的页面跳转 举例说 ...
- window.location.href和window.open的几种用法和区别
使用js的同学一定知道js的location.href的作用是什么,但是在js中关于location.href的用法究竟有哪几种,究竟有哪些区别,估计很多人都不知道了. 一.location.href ...
随机推荐
- MLlib 编程指导-spark-1.2.0
本文来自 http://spark.apache.org/docs/latest/mllib-guide.html 官方文档翻译 个人翻译 MLlib包括的算法和工具主要有:分类,回归,聚类,协同过滤 ...
- hdu 1241 Oil Deposits(DFS求连通块)
HDU 1241 Oil Deposits L -DFS Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & ...
- 微信小程序开发之大坑记之post请求
原文:http://blog.csdn.net/walkingmanc/article/details/54237961 在微信小程序开发过程中,如果你完全按照官方文档来,那么恭喜你,90%的可能性你 ...
- DZY Loves Colors
CF #446C:http://codeforces.com/problemset/problem/444/C 题意:给你n个数,大小从1到n,然后又两种操作,1 a b c表示把区间a b 更新为c ...
- poj 2406Power Strings
http://poj.org/problem?id=2406 #include<cstdio> #include<cstring> #include<algorithm& ...
- [Android] createTrack_l
在分析AudioTrack的时候,第一步会new AudioTrack,并调用他的set方法.在set方法的最后调用了createTrack_l创建音轨.我们现在来分析createTrack_l的流程 ...
- Android 手机上安装并运行 Ubuntu 12.04(转,没实测)
设备需要root权限,并且安装了BusyBox最小 1GHz 处理器(推荐)Android 系统版本 2.1 或以上Android 设备需要自定义的ROM固件SD卡至2.5GB (安装大映像的需要3. ...
- Oracle 用户权限管理
SQL> select * from ROLE_SYS_PRIVS where ROLE='RESOURCE'; ROLE PRIVILEGE ADM --------------------- ...
- Delphi HTTP error message: Can't execute C:\Program Files\Borland\Delphi7\Bin\serverinfo.exe 1813
delphi 调用Webservice ,停止服务的时候总是爱提示: Internal Server ErrorHTTP status code: 500 HTTP error message: C ...
- python3、selenium、autoit3,通过flash控件上传文件
autoit.au3 #include <Constants.au3> WinWait(); //暂停执行脚本,直到上传对话框出现 WinActive("打开") Wi ...