js如何遍历并取出对象的属性名?
dataObj = {
name : su,
age : 26,
height : 18cm
};for(var st in dataObj) {
console.dir(st);
}
/打印
name
age
height
转载于:https://www.cnblogs.com/YuyuanNo1/p/9257634.html
js如何遍历并取出对象的属性名?
dataObj = {
name : su,
age : 26,
height : 18cm
};for(var st in dataObj) {
console.dir(st);
}
/打印
name
age
height
转载于:https://www.cnblogs.com/YuyuanNo1/p/9257634.html