标签:
For/In 循环
JavaScript for/in 语句循环遍历对象的属性:
var person={fname:"John",lname:"Doe",age:25};
for (x in
person)
{
txt=txt + person[x];
}
for (var i=0,len=cars.length;
i<len; i++)
{
document.write(cars[i] + "<br>");
}
标签:
原文地址:http://www.cnblogs.com/wdlhao/p/4514877.html