获取iframe中的contentWindow

function getIframeWindow(iframeElement){
return iframeElement.contentWindow || iframeElement.contentDocument.parentWindow;
}

原文地址:https://www.cnblogs.com/cglWorkBook/p/5601701.html