js for in循环
function吧
全部回复
仅看楼主
level 2
shimeiriji 楼主
<button onclick="myFunction()">点击这里</button><p id="demo"></p>
<script>function myFunction(){
var txt="";var person={fname:"Bill",lname:"Gates",a:"sdf"};
for (x in person){txt=txt+person[x]+"<br>";//这里的txt+起什么作用
}document.getElementById("demo").innerHTML=txt;}</script>
2013年03月29日 13点03分 1
level 5
自己网上查嘛
2013年04月01日 15点04分 3
1