<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
//创建数组
var myarr = ['*','##',"***","&&","****","##*"];
amyarr[7] = "**";
//显示数组长度
alert(myarr.length);
//将数组内容输出,完成达到的效果。
document.write(myarr[0]+"<br/>");
document.write(myarr[7]+"<br/>");
document.write(myarr[2]+"<br/>");
document.write(myarr[4]+"<br/>");
</script>
</head>
<body>
</body>
</html>
amyarr[7] = "**"; 数组写错了 开头多写了个a
额。。。找到原因了,原来第二行多打了个字母,太粗心了。。。