原文:javascript 中 if (window != top) top.location.href = location.href;的意思

如果当前窗口不是顶级窗口,就强制修改为顶级窗口 目的是为了不让别人用iframe嵌入你的页面 ...

2017-12-23 17:03 0 1241 推荐指数:

查看详情

top.location.href和localtion.href有什么不同

top.location.href=”url” 在顶层页面打开url(跳出框架)    self.location.href=”url” 仅在本页面打开url地址    parent.location.href=”url”   在父 ...

Mon Oct 10 01:35:00 CST 2016 0 4389
top.location.href和localtion.href有什么不同

top.location.href=”url” 在顶层页面打开url(跳出框架)   self.location.href=”url” 仅在本页面打开url地址   parent.location.href=”url”   在父窗口打开Url地址 ...

Fri Jun 01 23:47:00 CST 2012 0 21341
top.location.href和localtion.href有什么不同

window.location.hreflocation.href是本页面跳转 parent.location.href是上一层页面跳转 top.location.href是最外层的页面跳转 top.location.href=”url” 在顶层页面打开url(跳出 ...

Fri Aug 25 16:35:00 CST 2017 1 7288
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM