日期:2014-05-18 浏览次数:20427 次
<form runat="server"> <asp:Panel ID="Panel1" runat="server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> </asp:Panel> <input type="button" value="按扭" onclick="toggle()" /> <script type="text/javascript"> function toggle() { var p = document.getElementById("<%=Panel1.ClientID %>"); p.style.display = p.style.display == 'none' ? 'block' : 'none' } </script> </form>