不要写在tbody上
直接写在tr上就可以了
<tr id="m1" style="visibility:hidden">
      <td width="11%">1111111111111</td>
      <td width="89%">22222222222</td>
    </tr></tbody>
    <tr id="m2" style="visibility:hidden">
      <td>2222222222</td>
      <td>3333333333333</td>
    </tr>

解决方案 »

  1.   

    谢谢,这个好像没什么影响,我主要想知道图片的是那段onMouseOver="" 和onMouseOver="" 怎么写,当移层上是不是只写一个层onMouseOver时不要隐藏就可以了?
      

  2.   

    <div id="menu1" style="position:absolute; left:11px; top:45px; width:990px; height:52px; z-index:1">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr id="m1" style="display:none">
          <td width="11%">1111111111111</td>
          <td width="89%">22222222222</td>
        </tr>
        <tr id="m2" style="display:none">
         <td width="11%">2222222222</td>
          <td>3333333333333</td>
        </tr>
    </tbody>
      </table>
    </div>
    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="14%"><img src="temp_1.jpg" width="169" height="25" onMouseOver="showOrHideMenu('m1')" onMouseOut="showOrHideMenu('m1')" style="cursor:hand "></td>
        <td width="86%"><img src="temp_2.jpg" width="169" height="25" onMouseOver="showOrHideMenu('m2')" onMouseOut="showOrHideMenu('m2')" style="cursor:hand "></td>
      </tr>
    </table>
    <script language="javascript">
    <!--
    function showOrHideMenu( objID )
    {
    var obj = document.getElementById( objID );
    if( obj.currentStyle.display == "none" )
    obj.style.display= "";
    else
    obj.style.display = "none";}
    //-->
    </script>
      

  3.   

    十分感谢我去试试去,我以前写都是直接把javascript写到onMouseOver后面,有点类似这种写法onClick="if(fstcase.style.display=='none'){fstcase.style.display='block';this.src='../imgs/treedots_export.gif';}else{fstcase.style.display='none';this.src='../imgs/treedots_add.gif';}" style="cursor:hand ">对单提出来写不太会。