將上面的類別圖寫成JavaScript物件導向的繼承,就會變成下列的程式碼: //上層類別 function Ancestor() { this.setBirthdayYear(1889); } //屬性 Ancestor.prototype.
確定! 回上一頁