标签:
function count(o){ var t = typeof o; if(t == ‘string‘){ return o.length; }else if(t == ‘object‘){ var n = 0; for(var i in o){ n++; } return n; } return false; }
对象属性个数
原文地址:http://www.cnblogs.com/fnncat/p/5299184.html