JavaScript window.length Property

You are Here:

JavaScript window.length Property

The window.length property returns the number of frames (<iframe>, <embed>, and <object>) in the window.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Click to find window length</p> <button onclick="myFunction()">Window Length</button> <p id="point"></p> <h2>Learn CSS</h2> <iframe src="/css"></iframe> <h2>Learn jQuery</h2> <iframe src="/jquery"></iframe> <script> var x = document.getElementById("point"); function myFunction(){ x.innerHTML = window.length; } </script> </body> </html>

Syntax

window.length

Return Values

ValueExplanation
NumberReturns the number of frames in the window.

Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author