ASP.NET & jQuery multi-select dropdownlist, get se

2019-08-29 09:53发布

I have an .aspx page with a databound multi-select jquery dropdown. This works nicley but how can i get hold of the selected items in the code behind?

2条回答
欢心
2楼-- · 2019-08-29 10:33

You can get Select Items by using below Code and store this selected item in an array for further need.

var phddoc = new Array();
            $.each($("#phddoct").next().find('input').filter(':checked'), function() {
                phddoc.push($(this).val());


            });

here 'phddoct' is the id of the select box[multiselect object]

best wishes.. shareef m2d

查看更多
Anthone
3楼-- · 2019-08-29 10:35

You can use jquery dropdown cheklist. Here is how you can get selected items http://dropdown-check-list.googlecode.com/svn/trunk/doc/dropdownchecklist.html see line 261.

查看更多
登录 后发表回答