imports an external JavaScript file


<script type="text/javascript" src="">

Browser
Internet Explorer Firefox Opera

The src attribute of the SCRIPT element is used to import an external JavaScript file into the document.


<script type="text/javascript" src="script.js"></script>


Attribute Value Explanation
type=" " text/javascript MIME type
src=" " URL the URL of the external JavaScript file

Example

<html>
<head>
<title>TAG index</title>

<script type="text/javascript" src="script1.js"></script>

</head>
<body>


<script type="text/javascript" src="script2.js"></script>


</body>
</html>