util.LoggerFactory = function(){
var messageListener = {}
this.count = 0//这个是定义了一个变量count吗?作用域是多大?
this.max = 1000
this.cache = []
this.dateformat = //这个等于号后空的是表示null吗?
this.onMessage = function(func,scope){
if(typeof func == "function")
messageListener = {func:func,scope:scope || null}
}
var messageListener = {}
this.count = 0//这个是定义了一个变量count吗?作用域是多大?
this.max = 1000
this.cache = []
this.dateformat = //这个等于号后空的是表示null吗?
this.onMessage = function(func,scope){
if(typeof func == "function")
messageListener = {func:func,scope:scope || null}
}
var messageListener = {}
this.count = 0 //局部变量,仅在util.LoggerFactory()函数内部有效
this.max = 1000
this.cache = []
this.dateformat = //语法错误
this.onMessage = function(func,scope){
if(typeof func == "function")
messageListener = {func:func,scope:scope || null}
}
var messageListener = {}
this.count = 0 //局部变量,仅在util.LoggerFactory()函数内部有效
this.max = 1000
this.cache = []
this.dateformat = //语法错误
this.onMessage = function(func,scope){
if(typeof func == "function")
messageListener = {func:func,scope:scope || null}
}
this.count 相当于private 只能在当前function中或当前对象中访问
this.dateformat = 这句话js解释到这里会报错的