为什么jquery自动完成只加载一次

时间:2017-02-17 02:44:01

标签: javascript jquery autocomplete

我的javascript

[Localizability(LocalizationCategory.ComboBox)]
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(ComboBoxItem))]
[TemplatePart(Name = "PART_EditableTextBox", Type = typeof(TextBox))]
[TemplatePart(Name = "PART_Popup", Type = typeof(Popup))]
public class ComboBox : Selector

为什么我只运行一次自动完成功能。这个结构有问题吗?或者我可以使用选择器function do_ajax(){ $.widget("custom.autocomplete", $.ui.autocomplete, { .... } var getData = function(request, response) { $.ajax({ url : '//htlsearch01.pegipegi.com/HotelSearchAPI/v1/autocomplete/' + request.term, cache : false, dataType : 'json', success : function proccessData (data){ ... } }) } $("#hotelNameKey").autocomplete({ source: getData, minLength: 3, select: function(event, ui) { ... } }) } } keypress吗? 谢谢

0 个答案:

没有答案