<tr>
<td input type="text" name="www"></tr>
</tr>
应该是:
<tr>
<td><input type="text" name="www"></td>
</tr>因为在同一个table里,只能用deleteRow和insertRow来做了,具体的使用网上有很多例子,你搜一下就可以了

解决方案 »

  1.   

    <table id=mxh>
    <tr>
    <td width="75%">   
         <select name="type" onChange="change(this)">
         <option value="">全部</option>
         <option value="1">系统日志</option>
        <option value="2">操作日志</option>
      </select>
        </td>
      </tr>
    <tr>
    <td><input type="text" name="www"></td>
    </tr></table>
    <script>
    function change(o)
    {
    if(o.options[o.selectedIndex].value=='1')
    document.all.mxh.rows[1].style.display='none'
    else
    document.all.mxh.rows[1].style.display=''
    }
    </script>
      

  2.   

    <table>
    <tr>
    <td width="75%">   
         <select name="type" onChange="change(this)">
         <option value="">全部</option>
         <option value="1">系统日志</option>
        <option value="2">操作日志</option>
      </select>
        </td>
      </tr>
    <tr>
    <td><input type="text" name="www"></td>
    </tr></table>
    <script>
    function change(o)
    {
    if(o.options[o.selectedIndex].value=='1')
    www.parentElement.parentElement.style.display='none'
    else
    www.parentElement.parentElement.style.display=''
    }
    </script>