判断一个对象中是否有指定属性 1 hasOwnProperty var a = {b:1}a.hasOwnProperty('b') true a.hasOwnProperty('c') false 2 in