对象没有hasOwnProperty方法(即未定义)- IE8

5 浏览
0 Comments

对象没有hasOwnProperty方法(即未定义)- IE8

这看起来相当奇怪。

这是我在IE8控制台中的实验:

typeof obj1 // "object"
obj1.hasOwnProperty // {...}
typeof obj2 // "object"
obj2.hasOwnProperty // undefined

有什么想法可以解释这个现象吗?

0