js中的this怎么用?

js中的this怎么用?

一般this出现在函数里时,只有在函数执行时才能确定this是什么,因为this是指那个调用这个函数的对象。比如说有如下方法:function test(){alert(this.length)}则,如下调用:var str = new S
JavaScript90