OOJavaScript学习笔记
iteye_6753
这个作者很懒,什么都没留下…
展开
-
基础知识
一、The differencs between JavaScript and classic OO language There is a difference between JavaScript and the "classic" OO languages like c++ and Java.You should understand right form the star...原创 2010-09-17 16:25:34 · 82 阅读 · 0 评论 -
About Function
Function defines: (1) var test = function(){ var s = 'hello'; for(var i in s){ consule.log(s[i]); } }; (2) (function($){ /* */ })(j...原创 2010-09-17 17:01:41 · 108 阅读 · 0 评论 -
About Object
An object is very similar to the array,but with the differences that you define the keys by yourself.So you are not limited to using only numbers but every keys that you liked. An object always ...原创 2010-09-17 17:49:57 · 241 阅读 · 0 评论 -
About prototype
1、prototype作为JavaScript·的原型,通过它可以实现代码的OO和reuse。 第一个例子先熟悉prototype的定义和使用语法 写道 function Triangle(side,length){ this.side = side; this.length = length; this.getArea = function(){ ...2010-09-21 11:21:45 · 73 阅读 · 0 评论 -
The way to enter parent
You can use uber property that points to the parents's prototype object. EXP:原创 2010-09-21 11:30:59 · 124 阅读 · 0 评论