Find out how many <iframe> elements there are in the window:
The result of x could be:
More "Try it Yourself" examples below.
The length property returns the number of <iframe> elements in the current window.
Tip: This property is often used together with the window.frames property.
Note: This property will also work for <frame> elements. However, the <frame> element is not supported HTML5.
This property is read-only.
|Return Value:||A Number, representing the number of frames in the current window|
Loop through all frames on a page, and change the location of all frames to "w3schools.com":
HTML reference: HTML <iframe> tag