Window: length property
HTML DOM
HTML DOM
The length read-only property of the Window interface returns the number of frames (either frame or iframe elements) in the window.
Value
A number.
Examples
if (window.length) {
// this is a document with subframes
}