Javascript examples for DOM HTML Element:IFrame
IFrame width Property - Return the width of an iframe:
<!DOCTYPE html> <html> <body> <iframe id="myFrame" src="http://java2s.com" height="200" width="250"></iframe> <button onclick="myFunction()">Test</button> <script> function myFunction() {/* w w w .j a va2s .com*/ var v = document.getElementById("myFrame").width; console.log(v); } </script> </body> </html>