日期:2014-05-16 浏览次数:20532 次
// array var mycars = new Array(); mycars[0] = "Saab"; mycars[1] = "Volvo"; mycars[2] = "BMW"; for (var x in mycars){ document.write(mycars[x] + "<br />"); } document.write("<br />");
// object var y; var account = {"name":"huxiao", "password":"mypassword", "nc":"huxiao_nc"}; for (y in account){ document.write(account[y] + "<br />"); }