Retrieves the URL to an external file that contains the source code or data.
Syntax
HTML | <SCRIPT SRC
= sURL... >
|
---|
Scripting | SCRIPT.src [ = sURL ] |
---|
Possible Values
sURL | String that
specifies or receives the URL of the source code or data. |
The property is read/write.
The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Remarks
The SRC attribute first was available in Microsoft® Internet Explorer 3.022. The src property is exposed through the object model as of Internet Explorer 4.0.
In Internet Explorer 5, the SRC attribute of the script element can refer to an XML data set if the LANGUAGE attribute is set to XML.
A script can contain an external reference as well as code within the block. The code specified by the src property precedes the code contained within the document.
Standards Information
This property is defined in
HTML 4.0 and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To