YouTip LogoYouTip

Prop Frame Src

# Frame/IFrame src Attribute [![Image 8: Frame/IFrame Object Reference Manual](#) Frame/IFrame Object](#) * * * ## Definition and Usage The src attribute can set or return the value of the src attribute in a frame/iframe element. The src attribute specifies the URL of the document to be loaded into the frame/iframe. ## Syntax frameObject.src=_URL_ or iframeObject.src=_URL_ * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The src attribute is supported by all major browsers. * * * ## Example ## Example Change the src attribute in an iframe: function changeSrc(){ document.getElementById("myframe").src="http://www.baidu.com"; }

Your browser does not support iframes.



[Try it Yourself Β»](#) * * Frame/IFrame Object](#)
← Prop Iframe WidthProp Form Enctype β†’