Latest web development tutorials

Window length property

Window Object Reference Window object

Definition and Usage

length property returns the frames in the current window number (including IFRAMES).

grammar

window.length


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support length property


Examples

Examples

Find the number of frames on the page, and change the src attribute of each frame element is "www.w3big.com":

<Html> <Body> <Iframe src = "http://www.microsoft.com"> </ iframe> <Iframe src = "http://www.google.com"> </ iframe> <Iframe src = "http://www.youtube.com"> </ iframe> <Script> for (var i = 0; i <frames length;. I ++) {frames [i] location = "http://www.w3big.com".} </ Script> </ Body> </ Html>



Window Object Reference Window object