Javascript Reference
Categories: SCRIPT

javascript SCRIPT src

@March 15, 2008, 1:22 a.m.
srcFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

Read/Write  

Provides the URL of the .js script file imported into the current script element. If you assign a new .js file to an existing script element in IE, the previous .js file's scripts do not disappear. But any duplications of variable or functions names are overwritten by the definitions from the new file. While Netscape 6 and later do not complain when you assign a new value to this property, the assignment does not necessarily load the new scripts into the current window or frame.

 
Example
 
if (document.getElementsByTagName("script")[1].src == "scripts/textlib.js") {
    ...
}
 
Value

Complete or relative URL as a string.

 
Default

None.


Powered by Linode.