读书人

一个找不到的异常

发布时间: 2012-02-19 19:43:38 作者: rapoo

一个找不到的错误!
//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方法去掉就不报了,为什么呢?

[解决办法]
多了个}

读书人网 >JavaScript

热点推荐