<html>
<head>
<title>Example Html Page</title>
</head>
<body>
......
</body>
<script type="text/javascript" src="example1.js"></script>
<script type="text/javascript" src="example2.js"></script>
</html>
上面代码中</body>和</html>之间可以写js语句吗?就像我写得那样。
之前,我们一般都写在<body></body>之间。
javascript
------解决方案--------------------
没问题
有时这样写更好,会确保DOM对象都生成了
------解决方案--------------------
可以啊 写在哪里好就视情况而定了