Auto Iframeâs Height Using Javascript Web-development (jquery) 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