You can place all your scripts into an external file (with a .js extension), then link to that file from within your HTML document. This is handy if you need to use the same scripts across multiple HTML pages, or a whole website.
To link to an external JavaScript file, you add a
src
attribute to your HTML script
tag and specify the location of the external JavaScript file.Linking to an external JavaScript file
<script type="text/javascript" src="external_javascript.js"></script>
No comments:
Post a Comment