在iframe子页面获取父页面元素
代码如下:
1//在iframe子页面获取父页面元素2$.('#objld', parent.document);34//在父页面获取iframe子页面的元素56$("#objid", document.iframes('iframe').document)7//或8$(document.getElementById('iframeId').contentWindow.document.body).html() $(document.getElementById('iframeId').contentWindow.document.body).html()910//在iframe中调用父页面中定义的方法和变量11parent.method12parent.value