```
alert(typeof window) //return object;
alert(typeof window === 'object') //return true;
```
```
```
Object.prototype.puts = function() {
word = document.createTextNode(this);
document.body.appendChild(word);
}
var str = 'String.';
window.puts(); // IE9以下没反应.
str.puts(); // 插入「String.」成功.
```
typeof window === object, 但是IE9以下给Object的prototype增加方法,为什么没法取得方法
求高手指点。
alert(typeof window) //return object;
alert(typeof window === 'object') //return true;
```
```
```
Object.prototype.puts = function() {
word = document.createTextNode(this);
document.body.appendChild(word);
}
var str = 'String.';
window.puts(); // IE9以下没反应.
str.puts(); // 插入「String.」成功.
```
typeof window === object, 但是IE9以下给Object的prototype增加方法,为什么没法取得方法
求高手指点。