<html>
<body>
<h1>外部 JavaScript</h1>
<p id="demo">一个段落。</p>
<button type="button" onclick="myFunction()">试一试</button>
<p>(myFunction 存储在名为 "myScript.js" 的外部文件中。)</p>
<script src="https://www.w3school.com.cn/demo/myScript.js"></script>
</body>
</html>