希望最好能用 css 实现

解决方案 »

  1.   

    <tr onMouseOver="changeStyle(this, 'on');" onMouseOut="changeStyle(this, 'out');"> --------------
    function changeStyle(obj, cmd)

     if(obj) try {
      var imgObj = obj.children(1).children(0);
      
      if(cmd == 'on') {
       obj.children(1).className = "ltdfocus";
       obj.children(2).className = "rtdfocus";
       if(imgObj)
       {
        if(imgObj.tagName.toUpperCase() == "IMG")
        {
     imgObj.src="file.gif";
         imgObj.style.left = "-1px";
         imgObj.style.top = "-1px";
        }
       }
      }
      else if(cmd == 'out') {
       obj.children(1).className = "ltdexit";
       obj.children(2).className = "rtdexit";
       if(imgObj)
       {
        if(imgObj.tagName.toUpperCase() == "IMG")
        {
     imgObj.src="file1.gif";
         imgObj.style.left = "0px";
         imgObj.style.top = "0px";
        }
       }
      }
     }
     catch (e) {}
    }
      

  2.   

    看看http://www.freewebs.com/hsdn/menu.htm的示例吧!对你很有帮助!