window.length

JavaScript1.0+, JScript1.0+, ECMAScript1.0+ Nav2+, IE3+, Opera3+ Syntax

							window.length

Description

The length property of the Window object represents the number of frames within a window. This returns the same results as Window.frames.length.

Example

Listing 7.548 shows a function that can be used to return the number of frames in a window.

Listing 7.548 Using the length Property of the Window Object
<script language="JavaScript">
<!-Hide

// Define a function to return the number of frames in the
// window passed.
function numFrames(win){
  return win.length;
}

// End hide --->
</script>
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.