标签的位置
现代 Web 应用程序一般都把全部 JavaScript 引用放在<body>
元素中页面内容的后面:
html
<!DOCTYPE html>
<html>
<head>
<title>Example HTML Page</title>
</head>
<body>
<!-- 这里放内容 -->
<script type="text/javascript" src="example1.js"></script>
<script type="text/javascript" src="example2.js"></script>
</body>
</html>