有两个页面,父窗口a.jsp如下:
<div class="formBox" id="formBox" style="display: none;">
<iframe width="100%" height="1000" src="" frameborder="0" scrolling="no" name="resultIframe" id="resultIframe"></iframe>
</div>
子窗口b.jsp是iframe指向的页面,现在怎么在父窗口a.jsp里面操作获取子页面
<div class="formBox" id="formBox" style="display: none;">
<iframe width="100%" height="1000" src="" frameborder="0" scrolling="no" name="resultIframe" id="resultIframe"></iframe>
</div>
子窗口b.jsp是iframe指向的页面,现在怎么在父窗口a.jsp里面操作获取子页面
但是总是报错,对象不支持此属性或方法
window.parent.$("#formBox") //做你想做的
var doc; if (document.all){//IE
doc = document.frames[id].document;
}else{//Firefox
doc = document.getElementById(id).contentDocument;
}
return doc;
}