87,994
社区成员
发帖
与我相关
我的任务
分享
function b(){
var a = [1, 2, 3];
var txt = "";
for (var i = 0; i < a.length; i++) {
txt += a[i] + "</br>";
}
document.getElementById("div").innerHTML = txt;
}
<buton onclick="b();">点击命令</button>