开发者

Getting value from dynamic dropdownlist

would anyone can help me get to get all selected values ​​of dropdownlists. They are created dynamically when I click a button and everybody gets the same id but I can not get all the values ​​and assign them to a field such hidden field, any ideas?

Follows the following code that adds and removes the drop and are now working properly.

$("#add").click(function(){
    //some code
});

$("#remove").click(function(){
    //some开发者_JS百科 code
});

<div id="divparent">
    <div id="divchild">
        <asp:DropDownList ID="DropDownList3" runat="server" Width="270"></asp:DropDownList>
    </div>
</div>


do get the value of the ddl try var ddlVal = $('#<=%DropDownList3.ClientID%>').val();


A dropdownlist can only have ONE selected value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜