每次猎取到的变量值不同的函数写法

var classIdInMemory = {
lastVal: publicClassName,
set:function(x){
if(x != ""){
this.lastVal = x;
}
},
get:function(){
return this.lastVal;
}
};
classIdInMemory.set(classid);
publicClassName = classIdInMemory.get();

posted @ 2015-03-30 14:53  smght  阅读(139)  评论(0)    收藏  举报