首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

一个找不到的异常

2012-02-19 
一个找不到的错误!//jChou@070307//开关functiononoff(){this.flg0this.arysnewArray()}onoff.prototy

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

[解决办法]
多了个}

热点排行