If you want to run the same
JavaScript on several pages without having to write the same script on every
page, you can write a JavaScript in an external file. Save the external
JavaScript file with a .js file extension.
To
use the external script, point to the .js file in the src attribute of the
<script> tag as shown:
<html>
<head>
<script
type="text/javascript" src="xxx.js"></script>
</head>
<body>
</body>
</html>
0 comments:
Post a Comment