+ -
当前位置:首页 → 问答吧 → 自己初始化代码的方式 大家用什么方式

自己初始化代码的方式 大家用什么方式

时间:2011-12-24

来源:互联网

(function WJ( ){
var CH=function( ){
return new CH.prototype.init( );
};
CH.prototype={
init:function( ){
return this;
},
length:10
};
CH.prototype.init.prototype=CH.prototype;
window.CH=CH( );

})( )
alert(CH.length);

大家用什么方式初始化代码,设置命名空间,组合自己代码或者组件的。。。

作者: cutemurphy   发布时间: 2011-12-24

没人愿意分享?

作者: cutemurphy   发布时间: 2011-12-24