单例模式
var Singleton = (function (){ var instance; function init(){ return { }; } return { getInstance: function(){ if(!instance){ instace = init(); } return instance; } }; })();
.
var Singleton = (function (){ var instance; function init(){ return { }; } return { getInstance: function(){ if(!instance){ instace = init(); } return instance; } }; })();
.