分两种情况:
第一种:
获取iframe对象的JS函数在父页面上,如下
function getIframeByElement(element){
var iframe;
$("iframe").each(function(){
if(element.ownerDocument === this.contentWindow.document) {
iframe = this;
}
return !iframe;
});
return iframe;
}f