函数那些事儿----映射

  x                          y

  1            x + 3              4

        3            x * 2              6

 传入

Iput[i].onclick = function(){

           ///清除所有样式   
             for ( var j = 0; j < Iput.length; j++) {
                 Iput[j].className = '' ;
                 box[j].style.display = 'none' ;
          }
     //给当前的按钮和div添加样式
             this .className = 'ing' ;
             box[ this .index].style.display = 'block' ;
         }
     }

 

返回       

猜你喜欢

转载自www.cnblogs.com/Longhua-0/p/9270162.html
今日推荐