Window.length
Summary
Returns the number of frames (either <frame>
or <iframe>
elements) in the window.
Syntax
JavaScript
Copy Code
framesCount = window.length;
framesCount
is the number of frames.
Example
JavaScript
Copy Code
if (window.length) { // this is a document with subframes }
Specification
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of 'Window.length' in that specification. |
Living Standard |
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/window/length