读取js对象属性长度

var obj = {
    a:1,
    b:2,
    c:3
}
var length = Object.keys(obj).length

 

猜你喜欢

转载自blog.csdn.net/supertree_l/article/details/83537069
0条评论
添加一条新回复