问答详情
源自:9-20 网页尺寸offsetHeight

哪位大佬帮忙简化一下代码

  menu_li[0].onmouseover=function()
      {startMove( under_line[0],{width:100});};
 
       
      menu_li[0].onmouseout=function()
      {startMove( under_line[0],{width:0});};
     
       menu_li[1].onmouseover=function()
      {startMove( under_line[1],{width:100});};
 
       
      menu_li[1].onmouseout=function()
      {startMove( under_line[1],{width:0});};
       
    menu_li[2].onmouseover=function()
      {startMove( under_line[2],{width:100});};
 
       
      menu_li[2].onmouseout=function()
      {startMove( under_line[2],{width:0});};
     menu_li[3].onmouseover=function()
      {startMove( under_line[3],{width:100});};
 
       
      menu_li[3].onmouseout=function()
      {startMove( under_line[3],{width:0});};
        menu_li[4].onmouseover=function()
      {startMove( under_line[4],{width:100});};
 
       
      menu_li[4].onmouseout=function()
      {startMove( under_line[4],{width:0});};
       

提问者:白墨钰 2019-01-21 16:34

个回答

  • 逃离外包
    2019-01-22 14:00:33

    jquery有事件委托到父级的写法