Inserting Source JavaScript Files : JavaScript in HTML « Development « JavaScript DHTML






Inserting Source JavaScript Files



<html>
<head>
<title>Using the SRC attribute of the script tag.</title>
</head>
<body>

<script language="JavaScript" SRC="src.js">

</script>
</body>
</html>


//File:src.js
alert("Hi");

           
       








Related examples in the same category

1.HTML comment that hides the script.
2.JavaScript Embedded in an HTML File
3.Using HTML Comments to Hide JavaScript Code
4.Embedding JavaScript in HTML
5.Using the Head for Definitions
6.A Basic JavaScript Starter Document
7.JavaScript Template File
8.Embedding a JavaScript Function