看板
[ Ajax ]
討論串[問題][js] closure 和 prototype的差別~
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
closure簡單說就是function defined in function. 用不用closure對於用this指定的property是沒差,但是對於區域變數就會有差別:. function test() {. var x=2;. var y=3;. this.getTest = functi
(還有877個字)
內容預覽:
(問題一). 在這個網頁==>. http://caterpillar.onlyfun.net/Gossip/AjaxGossip/ConstructorPrototype.html. 裡提到的 getSize 的建立方式分別為closure 和 prototype的方式. 請問差別在哪呢? 不知怎
(還有377個字)
首頁
上一頁
1
下一頁
尾頁