ASP.NET & jQuery multi-select dropdownlist, get selected values

你说的曾经没有我的故事 提交于 2020-01-16 18:29:22

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/2700010/asp-net-jquery-multi-select-dropdownlist-get-selected-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!