日期:2014-05-16  浏览次数:20344 次

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

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