table1.style.display="none";
or 
table1.style.visibility="hidden";

解决方案 »

  1.   

    function show()
      {
        document.form1.table1.style.visibility=hidden;
      }or document.form1.table1.style.display="none";
      

  2.   

    document.table1.style.display="none";
    这样把,估计你的表格不在表单里面,表格也不是表单元素
    是这个吧
    你把那个表格的name和id属性都设置为table1
      

  3.   

    直接用table1.style.display="none"就隐藏了,多谢楼上各位兄弟了,
    还有一问,那要是想让这个表格显示出来怎么写啊?
      

  4.   

    啊,<table border=1 id=table1 oumouseout=hidden()>
      function hidden()
      {
        table1.style.display="none";
      }
    鼠标依然在表格上方时,只要离开表格线,表格还是会隐藏,
    怎么才能使鼠标离开表格区域后,表格才能隐藏?
      

  5.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <table border=1 id=table1 onmouseout="hiddenFun()" >
    <tr><td>fdsafdsa</td><td>fdsafdsa</td><td>fdsafdsa</td></tr>
    <tr><td>fdsafdsa</td><td>fdsafdsa</td><td>fdsafdsa</td></tr>
    <tr><td>fdsafdsa</td><td>fdsafdsa</td><td>fdsafdsa</td></tr>
    </table>
    </body></html>
    <script language=javascript>
      function hiddenFun()
      {
        if(!table1.contains(event.toElement))
         table1.style.display="none";
      }
    </script>
      

  6.   

    多谢楼上
    table1.contains(event.toElement)
    是什么意思啊,我对JS不是太了解,能解释一下吗?
      

  7.   

    contains Method--------------------------------------------------------------------------------Checks whether the given element is contained within the object. SyntaxbFound = object.contains(oElement)ParametersoElement Required. Element object that specifies the element to check. Return ValueBoolean. Returns true if the element is contained within the current element, or false otherwise.