Change the location of the first <iframe> element (index 0) in the current window:
More "Try it Yourself" examples below.
The frames property returns an array-like object, which represents all <iframe> elements in the current window.
The <iframe> elements can be accessed by index numbers. The index starts at 0.
Tip: Use frames.length to find the number of frames.
Note: This property will also work for <frame> elements. However, the <frame> element is not supported in HTML5.
This property is read-only.
|Return Value:||Returns a reference to the Window object, representing all 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