DHTML & JSP
ProjectArchitect
这个作者很懒,什么都没留下…
展开
-
"ths" in JavaScript
NOTICE:This article is refered from http://www.quirksmode.org/js/this.html One of the most powerful JavaScript keywords is this. Unfortunately it is hard to use if you dont exactly know how it转载 2009-03-11 22:35:00 · 652 阅读 · 0 评论 -
javascript 继承实现方法
javascript的继承机制并不是明确规定的,而是通过模仿实现的,意味着继承不是由解释程序处理,开发者有权决定最适合的继承方式. 下面我给出几种常用的方法: 1 .对象冒充 原理: 构造函数使用this关键字给所有属性和方法赋值, 因为构造函数只是一个函数,所以可以使ClassA的构造函数成为classB的方法,然后调用它.这样classB就会收到classA的构造函转载 2009-06-02 19:42:00 · 666 阅读 · 0 评论