摘要:
<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 阅读全文