This site uses cookies from Google to deliver its services, to personalize ads and to analyze traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. Learn More

Auto Iframe’s Height Using Javascript

Auto Iframe’s Height Using Javascript Web-development (jquery) Auto Iframe’s Height Using Javascript

Auto iframe’s height using javascript
Auto iframe’s height using javascript
 <script type="text/javascript"> function iFrameHeight() { var f = document.getElementById('blockrandom'); f.style.height = '100px' ; var d = (f.contentWindow.document || f.contentDocument) ; var height = Math.max(d.documentElement.scrollHeight, d.body.scrollHeight) ; height += 20; f.style.height = height + 'px' ; f.setAttribute("height", height) ; } </script> <iframe onload="iFrameHeight()" name="" src="test.htm" width="100%" height="200" scrolling="no" align="top" frameborder="0"> No Iframes</iframe> 

0 Response to "Auto Iframe’s Height Using Javascript"

Posting Komentar

Contact

Nama

Email *

Pesan *