站在岸上的鱼的博客
站在岸上的鱼 · 共 1 篇文章
悟透javascript代码摘录
function Class(){ var aDefine = arguments[arguments.length-1];//最后一个参数为类定义 if (!aDefine)//没有参数就返回 { return; } var aBase = arguments.length > 1?arguments[0]:object;//解析基类 function prototype_(){};//构造prototype的临时函数,用于挂接原型链 prototype_.prototype = aBase.prototype;//准备传递prototype var aPrototype = new pr…
2011-12-14 22:12 · 评论(0)