{{ ApiRef() }}
Summary
Returns the number of frames (either {{HTMLElement("frame")}} or {{HTMLElement("iframe")}} elements) in the window.
Syntax
framesCount = window.length;
framesCount
is the number of frames.
Example
if (window.length) { // this is a document with subframes }
Specification
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG','browsers.html#dom-length','Window.length')}} | {{Spec2('HTML WHATWG')}} |