try<tr style="visibility:hidden">..

解决方案 »

  1.   

    <tr style="visibility:hidden">..
    仅隐藏内容<tr style="display:noe">..
    完全不显示
      

  2.   

    <tr style="visibility:hidden">会出现一个空白的行,我想隐藏行下面有数据的行直接接在隐藏行上一行的下面
      

  3.   

    <BODY>
    <TABLE>
    <TR><TD width="100">123</TD><TD width="100">456</TD><TD width="100">789</TD></TR>
    <TR><TD>abc</TD><TD>def</TD><TD>ghi</TD></TR>
    <TR><TD>jkl</TD><TD>mno</TD><TD>pqr</TD></TR>
    </TABLE>
    <BR>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    with(document.all.tags('table')[0].rows[1]){
    for (i=0;i<cells.length;i++)
    cells[i].width=cells[i].offsetWidth;
    }
    //-->
    </SCRIPT>
    <button onclick="with(document.all.tags('table')[0].rows[0].style){display=display==''?'none':''}">test</button>
    </BODY>
      

  4.   

    HTML规则:永远不要在第一行之外指定表格TD的宽度.
      

  5.   

    <tr>标题行</tr>---有很多合并行合并列,有多行
          所以不适宜作设定单元格的宽度,行1
    <tr>
      <td width=".."></td>
      <td width=".."></td>
    ...
      <td width=".."></td>
    </tr>----这里设定单元格的宽度,但无内容,行2<tr>
      <td>...</td>
      <td>...</td>
    ...
      <td>...</td>
    </tr>----有内容,行3我想隐藏行2,行3接在行1下面,但宽度设置为行2的设置
      

  6.   

    TO: onestab假如第一行有多个合并的单元格,如何在第一行设置每个单元格不同的宽度
      

  7.   

    那是html的规则,不是dhtml的规则。这里是javascript的天下呵呵。
      

  8.   

    每个<td>的width 不同就行了
      

  9.   

    在每一个table的最上面用col标签定义宽度。col的使用例子:<HTML>
    <BODY>
    <TABLE BORDER="2" RULES="groups">
    <!-- RULES is set to "groups", which has no effect in this sample. For this 
    attribute to work, you must use COLSPAN to define the groups of columns.-->
        <COL SPAN="2" STYLE="color:red">
        <COL STYLE="color:blue">
        <TR>
            <TD>This column is in the first group.</TD>
            <TD>This column is in the first group.</TD>
            <TD>This column is in the second group.</TD>
        </TR>
        <TR>
            <TD>This column is in the first group.</TD>
            <TD>This column is in the first group.</TD>
            <TD>This column is in the second group.</TD>
        </TR>
    </TABLE>
    </BODY>
    </HTML>