由于某种原因,我无法将我的设置方法中的函数调用到我的init方法中。如何将方法内部嵌套的函数调用到其他方法中
// this is how I use it now(dont work)
Plugin.prototype = {
settings: function(){
function hello(name){
alert('hi, '+name)
}
},
init: function(){
this.settings()
hello('John Doe')
}
}
更好地解释你想做 – Alexander
设置在它前面有一个下划线...'this._settings()' – Shmiddty
对不起,那只是一个排字错误 – user759235