以下让table1表格应厂:<html>
<head>
<style>
.clShow{}
.clHide{display:none;}
</style>
<script>
   function doClick(){
      document.getElementById("table1").className="clHide"
   }
</script>
</head><table id="table1" name="table1" class="clShow">  略    </table>
<table id="table1" name="table1" class="clShow">   略   </table>
<input type="button" onClick="doClick()">

解决方案 »

  1.   

    <script>
    function dis(){
    a.style.display="none";}</script><TABLE border="1" cellspacing="0" cellpadding="0" width="500" height="100" id="a">
    <TR>
    <TD></TD>
    <TD></TD>
    <TD></TD>
    </TR>
    <TR>
    <TD></TD>
    <TD></TD>
    <TD></TD>
    </TR>
    </TABLE><TABLE border="1" cellspacing="0" cellpadding="0" width="500" height="100" id="b">
    <TR>
    <TD></TD>
    <TD></TD>
    </TR>
    <TR>
    <TD></TD>
    <TD></TD>
    </TR>
    <TR>
    <TD></TD>
    <TD></TD>
    </TR>
    </TABLE>
    <input type="button" value="消失" onclick="dis()">
      

  2.   

    你只要这样子设置就行了.<style>
    @media print {
       .noprint {display:none}
    }
    </style>
    <table  class="noprint">
    <tr><td>不打印.</td></tr>
    </table>
      

  3.   

    <head>
    <style>
    .clShow{}
    .clHide{display:none;}
    </style> 
    </head>
    <table id="table1" name="table1" class="clShow"><tr><td>表格1</tr></td> </table>
    <table id="table2" name="table2" class="clShow"><tr><td>表格2</tr></td></table>
    <input type="button" onClick="table1.className=(table1.className=='clShow') ? 'clHide' : 'clShow';">