标签:遍历属性 list lis 程序员 .com arc bcd alert ems
<script language="javascript">var obj = new Object();
obj.myname = "我是对象";
obj.pro2 = "23";
obj.pro3 = "abcdeg"; php程序员之家
for (items in obj){
document.write("属性:"+items+"的值是 ("+ obj[items] +")");
document.write("<br>");
}
</script>
遍历方法(就多一个var,不会吧
for (var o in WordsList) {
document.write(o+"<br/>");
}
标签:遍历属性 list lis 程序员 .com arc bcd alert ems
原文地址:http://www.cnblogs.com/summary-2017/p/7262275.html