在Windows之间传递值的JavaScript在Firefox中不起作用
JavaScript that passes values between windows not working in Firefox
我已经看到了其他类似的问题,但我似乎仍然没有正确理解,我在我的ASPX页面上得到了这个JavaScript,但是它可以在IE和chrome中工作,但不能在Firefox中使用。我也尝试过FireBug插件,但它似乎没有帮助。
<script language="javascript" type="text/javascript">
function PassValues() {
window.opener.document.forms(0).submit();
self.close();
}
From SO itself: http://stackoverflow.com/questions/2678133/pass-a-value-from-parent-to-child-open-window
使用 window.open(( 方法设置引用:
var childWin = window.open("www.google.com" <etc.>);
Then treat childWin as a whole other window. For example,
childWin.document.getElementById('searchField')
将为您提供对 ID 为"搜索字段"的元素的引用。 等等。 冲洗并重复。
您的问题是使用 document.forms 作为可调用对象。 根据规格,事实并非如此。 试试window.opener.document.forms[0].submit()
。
相关文章:
- createElement("a") - FireFox JavaScript
- 为什么javascript:void(0)在Firefox中不起作用
- ascii输入键通过firefox中的javascript返回0
- Javascript firefox issue
- Javascript Firefox restart
- 在javascript firefox的同一选项卡中打开一个页面
- Javascript / Firefox width issue
- 事件未定义 JavaScript Firefox (JSON)
- javascript firefox iframe <html> trouble
- 我如何使用一个文本文件作为数据库在javascript?(Firefox插件)
- 只有数字的JavaScript Firefox解决方案
- Javascript-firefox:无法突出显示表行
- javascript firefox popup
- Javascript Firefox RadialGradient
- 如何在JavaScript (Firefox)中不使用for-in循环获取对象的所有属性
- 在javascript/firefox-adon中点击链接
- Javascript: Firefox,为什么出现这个错误
- Javascript, firefox插件,打开新选项卡
- 内联 JavaScript Firefox 错误
- JQuery/Javascript - Firefox在简单任务上崩溃,没有控制台错误