- 放在head标签内
- 放在body标签内
- 放在body标签后,html标签内
- 放在html标签后
<html>
<head>
<title>script location in html</title>
<script type="text/javascript"> alert("script in the head tag ");</script>
</head>
<body>
<h1>script location in html</h1>
<script type="text/javascript"> alert("script in the body tag ");</script>
</body>
<script type="text/javascript"> alert("script in the html tag ");</script>
</html>
<script type="text/JavaScript"> alert("script out the html tag ");</script>