Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

src attribute | src property

Sets or retrieves a URL to be loaded by the object.

Syntax

HTML<element src="p" ... >
JavaScript

p = object.src

Property values

Type: String

the URL.

Examples

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



function changeFrame(){
  alert (document.all.iframe1.src);
  document.all.iframe1.src="http://www.microsoft.com/";
  alert (document.all.iframe1.src);
}

See also

applet
embed
frame
iframe
xml

 

 

Show:
© 2014 Microsoft