两种获得iframe内元素的方法
jquery获取
$("#atrDialogIframe_protocoliframe").contents().find('span').text()
JS原生获取
document.getElementById("atrDialogIframe_protocoliframe").contentWindow.document.getElementById("span")
iframe调用上级窗口的JS
window.parent.上级方法;
两种获得iframe内元素的方法
jquery获取
$("#atrDialogIframe_protocoliframe").contents().find('span').text()
JS原生获取
document.getElementById("atrDialogIframe_protocoliframe").contentWindow.document.getElementById("span")
iframe调用上级窗口的JS
window.parent.上级方法;
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。