為什么alert同步彈出會(huì)出現(xiàn)2個(gè)重復(fù)的document.write結(jié)果?
<script type="text/javascript">
?//創(chuàng)建數(shù)組
?var? arr = ['*','##',"***","&&","****","##*"];
?arr[7] = "**";
?//將數(shù)組內(nèi)容輸出,完成達(dá)到的效果。
?document.write(arr[0]+"<br/>");
?document.write(arr[7]+"<br/>");
?document.write(arr[2]+"<br/>");
?document.write(arr[4]+"<br/>");
? //顯示數(shù)組長度
??? alert("數(shù)組arr 的length 長度是:"+arr.length);
</script>
2020-08-15
你這個(gè)alert的位置好像有問題吧