how to hide a panel in javascript

后端 未结 2 1169
滥情空心
滥情空心 2021-01-24 06:11

What is the best approach to show and hide an asp panel which is containing other controls like textbox and label controls

2条回答
  •  感动是毒
    2021-01-24 06:34

    Using jQuery, you can just switch visibilty:

    $('#<%= YourPanel.ClientID %>').hide();
    $('#<%= YourPanel.ClientID %>').show();
    

    Edit: jQuery is probably overkill just to hide/show, but if you plan to add more functionality client side, you should consider using it ;)

提交回复
热议问题