window.location.href和window.top.location.href的区别
2017-06-09 16:49
387 查看
if (window.location.href == window.top.location.href) { window.top.location.href = "/index.html"; }
top.window.location.reload 中top是什么意思 父框架的对象
比如 有网页 1.htm <span id='str'>显示内容1</span> <iframe src='2.htm'></iframe>
2.htm <input type='button' value='改变显示内容' onclick="top.document.getElementById('str').innerHTML='显示内容2222222';" />
也就是 如果 2.htm 里面 使用了: top.window.location.reload 那么就是 刷新父页面 1.htm 如果2.htm里面使用的是: window.location.reload 那就是 刷新框架 2.htm 父页面1.htm 不改变
top.window.location.reload 中top是什么意思 父框架的对象
比如 有网页 1.htm <span id='str'>显示内容1</span> <iframe src='2.htm'></iframe>
2.htm <input type='button' value='改变显示内容' onclick="top.document.getElementById('str').innerHTML='显示内容2222222';" />
也就是 如果 2.htm 里面 使用了: top.window.location.reload 那么就是 刷新父页面 1.htm 如果2.htm里面使用的是: window.location.reload 那就是 刷新框架 2.htm 父页面1.htm 不改变
相关文章推荐
- 关于js中window.location.href,location.href,parent.location.href,top.location.href的用法与区别
- window.top.location.href 和 window.location.href 的区别
- window.top.location.href 和 window.location.href 的区别
- 关于js中window.location.href,location.href,parent.location.href,top.location.href的用法与区别
- window.location.href和window.top.location.href的区别
- window.top.location.href 和 window.location.href 的区别
- window.location与window.open()的区别 "top.location.href"是最外层的页面跳转
- window.top.location.href 和 window.location.href 的区别
- top.window.location.href和 window.location.href 的区别
- 关于js中window.location.href,location.href,parent.location.href,top.location.href的用法与区别(跳出iframe方法)
- window.location.href()与window.open()区别
- window.opener.location.reload() and href()的区别 弹出页修改后刷新父窗体
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
- 区别window.location.Reload()和window.location.href=window.location.href;
- window.location.href和window.location.replace的区别
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别
- window.location.href和window.location.replace的区别