当前位置: 代码迷 >> JavaScript >> 一个找不到的异常
  详细解决方案

一个找不到的异常

热度:284   发布时间:2012-02-19 19:43:38.0
一个找不到的错误!
//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方法去掉就不报了,为什么呢?

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