我的笔记,看不太懂
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
/*var arr=['*','##',"***","&&","****","##*"];
//创建数组
arr[7]="**";//显示数组长度*/
function red(){
var arr = ['*','**','***','****','*****','******'];
for(var i = 0; i < arr.length; i++) {
document.write(arr[i]+'<br />');
}
}//将数组内容输出,完成达到的效果。
//document.write("数值的长度为:"+arr.length+"<br>")
function rec(){
alert(arr.length)
}
</script>
</head>
<body>
<input name='button' type='button' onClick='red()' value='点我弹出数组'/>
<br><br>
<input name='button' type='button' onClick='rec()' value='点我弹出数组长度'/>
</body>
</html>