javascript 实现隐藏行

脚本:
<Script language="JavaScript">
    function Show(ID)
    {

       if (document.all(ID).style.display=="none")
       {
          document.all(ID).style.display="";
       }
       else
       {
          document.all(ID).style.display="none";
       }
    }
</Script>

表格:
 <table  border="1" cellpadding="0" cellspacing="0" width="100%" >
        <tr height=20 id="tr1" onclick="Show('tr2');">
            <td bgcolor="#00cccc" align="center">
            <span style="font-size: 11pt">内部通告</span>
            </td>                           
        </tr>
        <tr id="tr2" height=20>
            <td align="center">                           
               <marquee onmousemove="stop();" onmouseout="start();" scrollAmount="1" scrollDelay="55" direction="up" behavior="scroll" width="95%"  height=268 msambientcpg="936"> <asp:Label ID="lab_nbgg" runat="server"></asp:Label></marquee></td>                     
        </tr>                      
     </table>

posted on 2007-01-23 15:38  Sunlight  阅读(3544)  评论(2编辑  收藏  举报

导航