Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML script src attribute

HTML

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the src property.


Definition and Usage

The src property specifies the URL of the external script file.

If you want to run the same JavaScript on multiple pages of a website, you should create an external JavaScript file instead of repeatedly writing the same script. Save the script file with the .js extension, and then in the