JavaScript Window property: frameElement
[this page | pdf | back links]
The frameElement property (of the JavaScript
BOM window object) returns
the <iframe>
object in which the current window resides. If the window is not within an <iframe>
object then this property will return null.
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Window frameElement:<br><b id="element">
<script>
document.getElementById("element").innerHTML = window.frameElement;
</script>
</body>
</html>
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)