摘要:
1 //一.工厂模式 2 function createBox(user,age){ 3 var obj=new Object(); 4 obj.user=user; 5 obj.age=age; 6 obj.run=function(){ 7 return this.user+this.age+"原型在哪里!"; 8 }; 9 return obj;10 }11 var obj1=createBox("mly",20);12 alert(obj1.run());13 var ob... 阅读全文
posted @ 2013-05-31 17:35
小银光
阅读(595)
评论(2)
推荐(1)

浙公网安备 33010602011771号