您现在的位置是:首页 > 电脑技术查询 > web开发

一个找不到的异常

编辑:chaxungu时间:2022-10-02 23:22:45分类:web开发

一个找不到的错误!
//jChou @ 070307
//开关
function onoff(){
this.flg=0;
this.arys=new Array()
};onoff.prototype={
__click:function(){
this.flg=++this.flg%2;
}

__transact:function(funcs){
this.arys=funcs;
if(this.flg==0){
return this.arys[0];
}else{
return this.arys[1];
}
}
}//onoff
var off=new onoff()
//错误是说 缺少“}” 如果我将__transact方法去掉就不报了,为什么呢?

------解决方案--------------------
多了个}