<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Array对象 </title>
<script type="text/javascript">
<script type="text/javascript">
<script type="text/javascript">
var myarr = new Array(1,2,3,4,5,6);
document.write(myarr + "<br>");
document.write(myarr.slice(2,4) + "<br>");
</script>
</script>
</script>
</head>
<body>
</body>
</html>
你把多余的SCRIPT标记去掉应该就可以了, 标记错误浏览器不能识别。另外,如果你自己编写文件在浏览器打开测试的话,看看保存的文件是不是HTML文件