Home > Web Front-end > JS Tutorial > body text

js controls the height/width of iframe so that it adapts to the content

高洛峰
Release: 2017-01-09 09:16:41
Original
1522 people have browsed it

<mce:script language= "Javascript "><!-- 

window.onload=function() 
{ 
parent.document.all("iframe1").style.height = document.body.scrollHeight; 
parent.document.all("iframe1").style.width = document.body.scrollWidth; 
} 
// --></mce:script>
Copy after login


For more js control of the height/width of the iframe so that it can adapt to the content, please pay attention to the PHP Chinese website!


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template