為何結(jié)果顯示空白?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>數(shù)組</title>
<script type="text/javascript">
?//創(chuàng)建數(shù)組
?var arr=['*','##','***','&&','****','##*']
?arr[7]="**";
?//顯示數(shù)組長度
?alert(arr.length);
?
?//將數(shù)組內(nèi)容輸出,完成達(dá)到的效果。
?document.write(arr[0]+<br>);
document.write(arr[7]+<br>);
document.write(arr[2]+<br>);
document.write(arr[4]);
</script>
</head>
<body>
</body>
</html>
2018-06-07
<br> 用引號(hào)
"<br>"
還有個(gè)不影響運(yùn)行的問題,第一行數(shù)組定義完加分號(hào);
2018-06-08
受教了