清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
/**Object*/
var obj=new Object;
obj.name="me";
obj.action=function(){alert("method");};
/**构造方法*/
function construction(){
this.name="me";
this.action=function(){alert("method");};
};
var obj=new construction();
/**构造方法call*/
function construction(){
this.name="me";
this.action=function(){alert("method");};
};
var obj={};
construction.call(obj);
/**匿名构造方法call*/
var obj={};
(function(){
this.name="me";
this.action=function(){alert("method");};
}).call(obj);
/**单实例构造方法,属性共享*/
var obj = function () {};
obj.prototype.name = 'me';
obj.prototype.action = function () {
alert("method");
}
var obj1=new obj();