我的面向对象的探索

mac2025-05-28  2

var sendRequest = function(data) { this.defaults = { a:123, b:456 } this.adds = function(){ var c=data console.log(this) //他们的this相同 this.crazy = function(){ console.log(this) } return c } console.log(this) //他们的this相同 this.adds() this.crazy() }

最新回复(0)