代码如下:
$.('#objld', parent.document);
在父页面获取iframe子页面的元素
代码如下:
$("#objid", document.iframes('iframe').document)
或
$(document.getElementById('iframeId').contentWindow.document.body).html() $(document.getElementById('iframeId').contentWindow.document.body).html()
显示iframe中body元素的内容
$("#testId", document.frames("iframename").document).html()
更多iframe子页面获取父页面元素的方法相关文章请关注PHP中文网!
Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务