1
我試圖讓該函數的功能與參數子功能的Javascript調用內部函數功能
function firstF(){
this.childF1 = function($argument){
// do something + $argument
}
this.childF2 = function($argument2){
// do something + $argument2
}
}
//Declare a new firstF
var firstFunction = new firstF();
firstFunction.childF1
我如何在這裏宣佈$參數裏面?
'firstF.childF1(「arg」);' – deadlock
我強烈建議您閱讀https://developer.mozilla.org/en-US/docs/JavaScript/Introduction_to_Object-Oriented_JavaScript – plalx