1 去掉双引号,只写函数名sleep_move_inner
2 在全局作用域中定一个变量,在局部作用于中引用这个变量
全局:var k
局部:k = sleep_move_inner
var obj = function() {this.a = function(arg){alert(arg)}
this.b = function(arg){alert(arg+1)}
}
var fn = new obj
fn.a('TEST')
1 去掉双引号,只写函数名sleep_move_inner
2 在全局作用域中定一个变量,在局部作用于中引用这个变量
全局:var k
局部:k = sleep_move_inner
var obj = function() {this.a = function(arg){alert(arg)}
this.b = function(arg){alert(arg+1)}
}
var fn = new obj
fn.a('TEST')