摘要: <script>varsingleton=function(){varuniqueInstance;functionconstructor(){varid='1';functionadd(){returnid+'2';};functionadd1(){return'3';};return{name:'name',method:function(){alert(this.name+add()+add1());}}}return{getInstance:function(){if(!uniqueInstance){uniq 阅读全文
posted @ 2012-03-01 09:12 Maxfong 阅读(204) 评论(0) 推荐(0) 编辑