0
正如我可以做,使孩子繼承父不改變孩子的代碼構造是這樣的:的Javascript繼承構造
var parent = function(params){
this.params = params;
}
var child = function(){}
var childObj = new child({one:1,two:2});
console.log(childObj.params) //should show params
您不能。您應該手動調用父方法(構造函數或泛型函數) – zerkms 2012-07-26 00:11:11