Javascript examples for DOM HTML Element:IFrame
The seamless property sets or gets whether an <iframe> has no borders or scrollbars.
This property reflects the HTML seamless attribute.
Set the seamless property with the following Values
Value | Description |
---|---|
true|false | Sets whether an iframe has no borders or scrollbars |
A Boolean, returns true if the iframe looks like it is a part of the containing document, otherwise it returns false
The following code shows how to check if an <iframe> looks like it is a part of the containing document (no borders or scrollbars):
<!DOCTYPE html> <html> <body> <iframe id="myFrame" src="http://java2s.com"> <p>Your browser does not support iframes.</p> </iframe>/* ww w.j a v a 2 s . c om*/ <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myFrame").seamless; document.getElementById("demo").innerHTML = x; } </script> </body> </html>