var Direction = function(direction){ this.dom = null; this.init(direction); return this.dom; }中this.init(direction)是什么意思,这是定义的一个方法还是怎么回事呀?这几句代码,麻烦大神给讲解下.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 03:02:46
var Direction = function(direction){ this.dom = null; this.init(direction); return this.dom; }中this.init(direction)是什么意思,这是定义的一个方法还是怎么回事呀?这几句代码,麻烦大神给讲解下.

var Direction = function(direction){ this.dom = null; this.init(direction); return this.dom; }中this.init(direction)是什么意思,这是定义的一个方法还是怎么回事呀?这几句代码,麻烦大神给讲解下.
var Direction = function(direction){ this.dom = null; this.init(direction); return this.dom; }
中this.init(direction)是什么意思,这是定义的一个方法还是怎么回事呀?这几句代码,麻烦大神给讲解下.

var Direction = function(direction){ this.dom = null; this.init(direction); return this.dom; }中this.init(direction)是什么意思,这是定义的一个方法还是怎么回事呀?这几句代码,麻烦大神给讲解下.
this 指包含Direction 方法的对象 这个对象还有 init 方法 var XXX={ var Direction = function(direction){} var init = function(XXX){} }