Firefox window.parent.location
我有一个 Html 页面index.htm,其中有一个用于页面search.htm的iframe search.htm 有这样的代码,
function executeSearch() {
window.parent.location = "/SearchResults.aspx?t=" + txt_Search.value;
}
该代码现在从 index.htm 页面执行,它在 IE 和 Chrome 上运行良好,但在 FireFox 上不起作用...有什么解决办法吗? 我尝试了 window.parent.location.href、window.opener.location、window.parent.document.location ...但这些都不起作用。
在网上搜索后,我发现有人有类似的问题,他说这是 Firefox 中的安全设置......这是真的吗?如果是的话有什么解决方法吗?
I've a Html page index.htm which has an iframe to page search.htm
the search.htm has code like this
function executeSearch() {
window.parent.location = "/SearchResults.aspx?t=" + txt_Search.value;
}
this code executed now from index.htm page and it works great on IE and Chrome, but not FireFox ... is there any work around ??
I tried window.parent.location.href, window.opener.location, window.parent.document.location ... but nothing of those worked.
after searching the web i found some one with similar prob he said that this is a security settings in Firefox ... is this true?? and if so is there any workaround ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
window.top.location.href
代替。Try using
window.top.location.href
instead.