Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Frame/IFrame src property

Frame/IFrame src property

Frame/IFrame Object Reference Frame/IFrame Object


Definition and Usage

The src property can set or return the value of the src attribute of the frame/iframe element.

The src property specifies the URL of the document loaded into the frame/iframe.

Syntax

frameObject.src=

URL

or

iframeObject.src=

URL


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the src attribute


Example

Example

Change the src attribute in the iframe:

Runoob Tutorial(runoob.com)



Try it »


Frame/IFrame Object Reference Frame/IFrame Object