Reference javascript source file stored outside : Source File « Language Basics « JavaScript Tutorial






<html>
<head>
<title>Title of Document</title>

<script src="path-to-file/fileName.js"></script>

</head>
<body>

The content of
your page goes here.

</body>
</html>








1.7.Source File
1.7.1.Use the 'script' tag to incluse your javascript code
1.7.2.HTML Template Page supporting the JavaScript
1.7.3.Define script in HEAD section
1.7.4.Define javascript code in BODY section
1.7.5.Define message in one block and output it in another
1.7.6.Reference javascript source file stored outside
1.7.7.Mix simple code with HTML
1.7.8.Mix complicated code with HTML