document.write()直接写入html 不显示,求解答
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
//创建数组
var myarr = ["*","##","***,""&&","****","##*"];
myarr[7]="**";
//显示数组长度
document.write(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>