as i shown in image i did autocomplete but i need checkboxlist associated with the result我需要一个自动填充文本框,其中包含一个与多个选择选项相关联的复选框列表,
答案 0 :(得分:0)
Project.requestHandler.sendRequest(URL.INBOX_PAGE.GET_USERNAME_BY_USERID,userId,function(response) {
if(response.d!= null){
$。each(response.d,function(key,value){ $("#用户名&#34)。追加($(""。)式("复选框")VAL(value.Id)的.html(值。名));
});
$("#用户名&#34)。均匀的(); }
});
答案 1 :(得分:-1)
$('#btnSubmit').click(function() {
var SelectedCheckboxes = []
$('input:checkbox[name=chkbox]:checked').each(function() {
SelectedCheckboxes.push($(this).val());
})
$(#textbox1).val(SelectedCheckboxes.join(','));
})