62,074
社区成员
发帖
与我相关
我的任务
分享
$(document).ready(function () {
$("#show").click(function () {
$("div").children(".moreSearchBar:hidden:first").css("display", "block");
});
$("#hid").click(function () {
$("div").children(".moreSearchBar:visible:last").children("input").val("");
$("div").children(".moreSearchBar:visible:last").css("display", "none");
});
});
.moreSearchBar
{
display:none;
}
<div>
<input id="show" type="button" value="+" />
<input id="hid" type="button" value="-" />
<asp:Button ID="Button1" runat="server" Text="搜索" onclick="Button1_Click"
ViewStateMode="Enabled" />
</div>
<div>
<asp:Panel ID="Panel1" runat="server" CssClass="moreSearchBar" >
<asp:DropDownList ID="DropDownList3" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="moreSearchBar" >
<asp:DropDownList ID="DropDownList4" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList5" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList6" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server" CssClass="moreSearchBar" >
<asp:DropDownList ID="DropDownList7" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList8" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList9" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" CssClass="moreSearchBar" >
<asp:DropDownList ID="DropDownList10" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList11" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox12" runat="server"></asp:TextBox>
<asp:DropDownList ID="DropDownList12" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox13" runat="server"></asp:TextBox>
</asp:Panel>
</div>