This page is Not Ready

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

src (iframe, embed, xml)

Applies to ?
## Examples

This example uses the src property to change the src attribute of an iframe.

function changeFrame(){
  alert (document.all.iframe1.src);
  alert (document.all.iframe1.src);



Windows Internet Explorer 8 or later. In IE8 Standards mode, the value of the SRC attribute of the frame and iframe elements depends on the context of the reference to the attribute. When read as a Document Object Model (DOM) attribute, SRC returns an absolute URL. The value specified by the page author is returned when SRC is read as a content attribute, when the page is displayed in an earlier document compatibility mode, or when the page is viewed with an earlier version of the browser. For more information, see Attribute Differences in Internet Explorer 8.


See also

Related pages

  • applet
  • embed
  • frame
  • iframe
  • xml