为什么我点击点击按钮,点击按钮的上下内容都不见了?
<!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 rcv(){
document.write("显示字符串长度为:"+arr.length)//显示数组长度
aa=arr.length;
alert(aa);}
//将数组内容输出,完成达到的效果。
document.write(arr[0]+'<br>');
document.write(arr[7]+'<br>');
document.write(arr[2]+'<br>');
document.write(arr[4]+'<br>');
</script>
</head>
<body>
<input name="button" type="button" value="点击" onclick="rcv()"><br>
<script type="text/javascript">
document.write(arr[0]+'<br>');
document.write(arr[7]+'<br>');
document.write(arr[2]+'<br>');
document.write(arr[4]+'<br>');
</script>
</body>
</html>