
js & css
文章平均质量分 78
iteye_3964
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
javascript object model
the difference between prototype property and [[prototype]] which constructs the chain of prorotype each object has a inner property called '[[prototype]] ', whose value is null or point to some...2008-05-26 17:39:00 · 156 阅读 · 0 评论 -
javascript 执行模型的一些测试
一 js的扫描过程 js在执行代码之前,会有一个扫描(相当于预编译)的过程,这一过程用于获取定义的变量名和函数对象。主要包括如下几个处理步骤: 碰到了“var instance=xxx;” 这样的语句时,则在当前variable object上添加此属性,赋初值为undefined 碰到了函数的定义"function func(){}"时,则使用此函数定义创建相应的函数对象,然后在va...2008-08-21 17:15:46 · 120 阅读 · 0 评论 -
javascript prototype 继承
js中基于prototype实现继承的基本代码如下所示: function(SubClass, SuperClass){ function F(){} // F.prototype = SuperClass.prototype; // 实现继承的关键,构造 prototype chain SubClass.prototype = new F(); // 1...原创 2008-08-26 12:34:28 · 162 阅读 · 0 评论 -
mootools Class 继承机制
var Class=function(B) { var A=function() { // 存在initialize函数的话就执行此函数,否则直接返回 // arguments[0] 在什么情况下会 === null ? return(arguments[0]!==null&&this.initialize&&$type(this.i...2008-08-26 14:59:39 · 117 阅读 · 0 评论 -
javascript中==和===操作符的比较
摘引至"JavaScript: The Definitive Guide, 5th Edition " chapter 5 section 4 In JavaScript, numbers, strings, and boolean values are compared by value . In this case, two separate values are involved, ...原创 2008-08-26 15:30:32 · 157 阅读 · 0 评论 -
用JavaScript实现截取指定长度的HTML字符串
/* * 调整截取的字符串的位置。因为在截取一个字符串后可能存在两种情况: * (1)字符串末位正好处于一个标签的属性之中的某个位置。如:<a id="xxx" href="xxx" ></a>中红色标注的位置。 * (2)字符串末位处于一个标签内容之中的某个位置。如:<a >here <...原创 2008-09-23 13:25:39 · 606 阅读 · 0 评论