标签:style blog color io ar java sp div art
单例模式的实现:
//单例对象
var Universe;
(function () {
//单例缓存
var instance;
Universe = function Universe() {
if (instance) {
return instance;
}
instance = this;
// 其它内容
this.start_time = 0;
this.bang = "Big";
};
} ());
标签:style blog color io ar java sp div art
原文地址:http://www.cnblogs.com/qzyuanmu/p/4016116.html