0
這甚至可能嗎?在父函數原型中使用原型的Javascript函數
function foo() {
// do stuff
}
foo.prototype = {
// stuff...
bar: function() {
// do some things with this, where this refers to foo
},
bar.prototype: {
// set some definitions for bar to work with.
// Where does "this" go and what does it refer to?
}
}
你嘗試過嗎? – Joseph
是的,我得到了一些根本性的問題。我不確定要去哪裏,所以我在這裏問了:) – felamaslen