xxxxxxxxxx
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<h2>External JavaScript</h2>
6
7
<p id="example-3">A Paragraph.</p>
8
9
<button type="button" onclick="myFunction()">Try it</button>
10
11
<p>(myFunction is stored in an external file called "myScript.js")</p>
12
13
<script src="myScript.js"></script>
14
15
</body>
16
</html>
1
1
1
1
Console errors: 0