<table id="tb1">显示
tb1.style.display="inline"隐藏
tb1.style.display="none"

解决方案 »

  1.   

    <INPUT type="checkbox" onclick="show(this.checked)">显示<br>
    <TABLE id=tb1 style="display:none;" border=1>
      <TR>
          <TD>name1</TD>
          <TD>address1</TD>
      </TR>
    </TABLE>
    <script>
    function show(isShow){
    document.all.tb1.style.display=isShow?"inline":"none"
    }
    </script>
      

  2.   

    <TABLE id=tb1 style="display:none">
      <TR>
          <TD>name1</TD>
          <TD>address1</TD>
      </TR>
    </TABLE><INPUT type="button" onclick="tb1.sytle.display='block'">
      

  3.   

    document.all('tbl').style.display='none'
      

  4.   

    <script language=javascript>
    function hide()
    {
    document.getElementById("table1").style.display='none';
    }
    </script><table border="1" width="100%" id="table1">
    <tr>
    <td> </td>
    </tr>
    </table>
    <form method="POST" action="">
    <p><input type="button" value="按钮" name="B3" onclick="hide();"></p>
    </form>
      

  5.   

    更完整的:<html>
    <head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title>
    <script language=javascript>
    function hide()
    {
    document.getElementById("table1").style.display='none';
    }
    function show()
    {
    document.getElementById("table1").style.display='';
    }
    </script>
    </head>
    <body>
    <table border="1" width="100%" id="table1">
    <tr>
    <td> </td>
    </tr>
    </table>
    <form method="POST" action="">
    <p><input type="button" value="show" name="B3" onclick="hide();">
    <input type="button" value="hide" name="B4" onclick="show();"></p>
    </form>
    </body>
    </html>