<img src="http://www.power-depot.com/images/battery_pse/mid/ABC.jpg" onerror="!this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'">  !this.e?是判断什么?
this.e==1?又是代表什么?
高人请指教!最好可以都解释下

解决方案 »

  1.   

    运算,我懂,关键是!this.e这个状态是什么?
    this.e==1?这又是在判断什么?
    清高人指点
      

  2.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  3.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  4.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  5.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  6.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  7.   


    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )
      

  8.   

    !this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src='default.gif'为多目运算等价于下面语句if(!this.e){
      this.e=1;
      src='1.gif';
    }else(
      if(this.e == 1){
        this.e = 2;
        src = '2.gif';
      }else{
        src = 'default.gif';
      }
    )解译为:当图片http://www.power-depot.com/images/battery_pse/mid/ABC.jpg不存在时用1.gif替换,前二者都不存在时用2.gif替换,前三者都不在时用default.gif替换
      

  9.   


    <img src="http://www.power-depot.com/images/battery_pse/mid/ABC.jpg"onerror="!this.e?(this.e=1,src='1.gif'):this.e==1?(this.e=2,src='2.gif'):src=''default.gif'" e='1' > e 表示img的一个自定义属性,把值设置不为空就会执行
    this.e==1?(this.e=2,src='2.gif'):src=''default.gif'"
    如果e的值等于1 则img的src为2.gif,否则为default.gif
      

  10.   


    我想请问,e是一个什么属性呢?是javascrip自身带的吗?是exit得简略吗?
    是否是存在就true,不存在就false?
      

  11.   

    e是错误属性try{
    }catch(e){//这里都e跟this.e的e是一个意思,你可以看看try  catch语句说明}