all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

src attribute | src property

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

Syntax

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

p = object.src

Property values

Type: String

the URL of the source code or data.

Remarks

A script element can use the SRC attribute to refer to code stored in an external script library. If a script element refers to an external library and also contains code local to the block defined by the element, the code in the external library is executed before the local code.

See also

script

 

 

Show:
© 2014 Microsoft