SRC Attribute | src

HTML (DHTML)

SRC Attribute | src Property

Internet Development Index

Retrieves the URL to an external file that contains the source code or data.

Syntax

HTML<SCRIPT SRC = sURL... >
ScriptingSCRIPT.src [ = sURL ]

Possible Values

sURLString 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 Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

SCRIPT