看板 [ Ajax ]
討論串[ js ] 幾種 define class 的 patterns
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 1→)留言4則,0人參與, 最新作者TonyQ (沉默是金。)時間14年前 (2011/03/23 03:10), 編輯資訊
0
0
0
內容預覽:
It's not good , every time you new a instance ,. it need to re-allocate again , and you couldn't overwrite it anyway.. Because every time you new a ob
(還有980個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者B9 (葉酸酸)時間14年前 (2011/03/23 01:29), 編輯資訊
0
0
0
內容預覽:
1. 定義 function 再把 method 加到 prototype 裡面。. function Cat(){}. Cat.prototype.eat = function(){};. Cat.prototype.drink = function(){};. constructor 當然可以像
(還有1327個字)
首頁
上一頁
1
下一頁
尾頁