How to use window object length in JavaScript

In this article i am going to explain about window object length property.
  • 1431

Length property in JavaScript window object

The length property returns the number of frames in the current window.


Syntax of Length property

window.innerHeight


Browser support

The length property is supported in all major browser.

Example of Length  property

<html>

<body>

 

<iframe src="http://microsoft.com"></iframe>

<iframe src="http://google.com"></iframe>

<script type="text/javascript">

    for (var a = 0; a < frames.length; a++) {

        frames[a].location = "http://www.c-sharpcorner.com"

    }

</script>

</body>

</html>


Output:

length.jpg

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.