X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Window frames Property

Window Object Reference Window Object

Example

Loop through the frames on a page, and change the src property of all frame elements to "w3schools.com":

var frames = window.frames;
var i;

for (i = 0; i < frames.length; i++) {
    frames[i].location = "http://www.w3schools.com"
}

Try it yourself »


Definition and Usage

The frames property returns an array-like object, which represents all the frames (including iframes) in the current window.

Tip: Use frames.length to find the number of frames.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The frames property is supported in all major browsers.


Syntax

window.frames

Technical Details

Return Value: Returns a reference to the Window object, representing all of the frames in the current window


Window Object Reference Window Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook