我试图在asp.net中显示一些包含一些控件的div。我希望能够在订单中显示它们并按顺序删除它们。所以当我点击一个添加div的按钮时,它必须得到行中的下一个。当我删除它们时,另一种方式。这是divs
<div id="AdditivesENumbers1" style="display: none" class="myRow">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers1" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers1" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment1" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment1" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers2" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers2" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers2" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment2" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment2" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers3" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers3" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers3" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment3" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment3" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers4" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers4" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers4" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment4" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment4" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers5" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers5" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers5" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment5" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment5" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers6" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers6" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers6" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment6" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment6" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers7" style="display: none" class="myRow ">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers7" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers7" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment7" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment7" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div id="AdditivesENumbers8" style="display: none" class="myRow">
<div class="mediumCol">
<div class="myRow">
<div class="mediumCol title">
<asp:Label ID="lblNewAdditivesENumbers8" runat="server" Text="Additives & E-numbers"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="mediumCol">
<asp:DropDownList ID="ddNewAdditivesENumbers8" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
<div class="smallCol ekstraSpaceLeft">
<div class="myRow">
<div class="smallCol title">
<asp:Label ID="lblNewAdditivesENumbersLevelOfContainment8" runat="server" Text="Level Of Containment"></asp:Label>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<asp:DropDownList ID="ddNewAdditivesENumbersLevelOfContainment8" CssClass="form-control" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="myRow">
<div class="smallCol">
<div class="myRow">
<div class="smallCol">
<input id="addNewAdditive" value="Add new" type="button" class="btn btn-default" />
</div>
</div>
</div>
</div>
</div>
加载页面时,没有任何div可见。首先,当您单击此按钮时。
<div class="myRow">
<div class="smallCol">
<div class="myRow">
<div class="smallCol">
<input id="addNewAdditive" value="CLICK" type="button" class="btn btn-default" />
</div>
</div>
</div>
</div>
这是否可能,你们中有没有人对如何做到这一点有什么想法?