for(var j =0j<5j++){
document.write(j+i+1 + "&nbsp")
}
document.write("<br />")
}
主要有两种方式吧:var a = [1,2,3]
for (var i =0i<a.lengthi++)
{
document.write("index::"+i+"value::"+a[i]+"<br/>")
}
for (var i in a)
{
document.write("index::"+i+"value::"+a[i]+"<br/>")
}