js 子窗体调用父窗体js
场景:,关于在FireFox上子窗体调用父窗体JS方法的有关问题
求助,关于在FireFox下子窗体调用父窗体JS方法的问题
子窗体调用父窗体的closeMe
父窗体
<script>
function closeMe() {
alert("OK");
}
</script>
请问为什么同样的代码,在IE下好用,FireFox下面就调用不到closeMe ?
------解决方案--------------------
window.opener.closeMe()试试这个
------解决方案--------------------
parent.window.closeMe()
------解决方案--------------------
top.closeMe()
求助,关于在FireFox下子窗体调用父窗体JS方法的问题
子窗体调用父窗体的closeMe
- HTML code
<div class="pc"><a id="pc_butt" href="#" onclick="window.parent.closeMe()"><img src="images/pc_button.jpg" width="138" height="24" border="none" /></a></div>
父窗体
<script>
function closeMe() {
alert("OK");
}
</script>
请问为什么同样的代码,在IE下好用,FireFox下面就调用不到closeMe ?
------解决方案--------------------
window.opener.closeMe()试试这个
------解决方案--------------------
parent.window.closeMe()
------解决方案--------------------
top.closeMe()