Object.getOwnPropertyNames( obj 对象变量 ) 返回:Array 对象变量所有键 示例: var obj = {a:1,b:2,c:3} var arr = Object.getOwnPropertyNames(obj); 结果: arr = [a,b,c]