标签:
1 $(txtTest1).autocomplete({ 2 source: function (request, response) { 3 $.ajax({ 4 url: ‘HttpHandler.ashx?todo=getdate&term=‘ + request.term, 5 dataType: "json", 6 success: function (data) { 7 response($.map(data, function (item) { 8 return { 9 label: item["TEST1"] + "|" + item["TEST2"], 10 value: item["TEST1"], 11 entity: item["TEST1"] + "|" + item["TEST2"] + "|" + item["TEST3"] 12 } 13 })) 14 } 15 16 17 }) 18 } 19 , select: function (e, ui) { 20 var entityAry = ui.item.entity.split("|"); 21 $(txtTest1).val(entityAry[0]); 22 $(txtTest2).val(entityAry[1]); 23 $(txtTest3).val(entityAry[2]); 24 } 25 , minLength: 1 26 });
autocomplete一次返回多个值,并且选定后填到不同的Textbox中
标签:
原文地址:http://www.cnblogs.com/kangjing/p/5489900.html