onload=""and use other event to make it visible

解决方案 »

  1.   

    <body MS_POSITIONING="GridLayout" onload="init()">
    <script language="javascript">
               function init()
               {
                
                  var l1=document.getElementById("ListSN");
                  
                 l1.style.display="none";
               
                        
               }    
    </script>
    <form id="Form1" method="post" runat="server">
    <FONT face="宋体">
    <asp:TextBox id="txtEquipName" style="Z-INDEX: 101; LEFT: 288px; POSITION: absolute; TOP: 96px"
    runat="server"></asp:TextBox>
    <asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 72px; POSITION: absolute; TOP: 256px" runat="server"
    Text="Button"></asp:Button>
    <asp:ListBox id="ListSN" style="Z-INDEX: 102; LEFT: 288px; POSITION: absolute; TOP: 128px" runat="server"
    Width="144px" Height="88px" Visible="False"></asp:ListBox>
    <asp:Label id="Label1" style="Z-INDEX: 104; LEFT: 320px; POSITION: absolute; TOP: 280px" runat="server"
    Height="32px" Width="112px">Label</asp:Label></FONT></form>
    </body>
    是这样吗?但每次ListSN还是会出现啊?