• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Introduction to JavaScript > JavaScript from External Files

1.8. JavaScript from External Files

When Web pages contain long scripts or functions that will be used by other documents, these scripts can be placed in external files. The external JavaScript files must end with a .js extension. The name of the external JavaScript file is assigned to the src attribute of the <script> tag in the HTML file. The name includes the full URL if the script is on another server, or just the script name if in the local directory. You can include more than one .js script in a file.

<script language="JavaScript" src="http://servername/javascriptfile.js">
</script>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint