在项目中需要获取到ifarm下的地址,用到 top.location.href ,把类似的方法总结一下做个笔记:
- top.location.href 获取最外层的地址,也可以跳转或打开指定页;
- window.location.href 和 location.href 是当前页面跳转
- parent.location.href 获取上一层页面跳转
- window.open() 在网站上打开另外的一个网站的网页
- window.location() 只能在一个网站中打开当前网站的网页
在项目中需要获取到ifarm下的地址,用到 top.location.href ,把类似的方法总结一下做个笔记: