(Multi-browser compatible) { var a = parent.document.getElementsByTagName("IFRAME"); for(var i=0; i {
if(a[i].contentWindow==window) { var h = document.body.scrollHeight; if(document .all) {h = 4;} .opera) {h = 1;} a[i].style.height = h; } } } catch (ex) { alert("Script cannot be operated across domains! "); } } if(document.attachEvent) window.attachEvent("onload", iframeAutoFit); else window.addEventListener('load', iframeAutoFit, false);
iframe Adapt to the web page it loads (compatible with multiple browsers)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn