Easy Tutorial
❮ Jsref Lastindexof Array Prop Month Required ❯

Window length Property


Definition and Usage

The length property returns the number of frames (including IFRAMEs) in the current window.

Syntax


Browser Support

All major browsers support the length property.


Example

Find the number of frames on the page and change the src attribute of each frame element to "www.tutorialpro.org":

<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&lt;frames.length; i++)
{
    frames[i].location="http://www.tutorialpro.org"
}
</script>

</body>
</html>

❮ Jsref Lastindexof Array Prop Month Required ❯