自动填充列表显示空结果。我在页面上有其他自动填充字段正常工作。
empty autocomplete list picture
我检查了数据源(数组)并且数据在那里(见下文,没有数据包含" A")
not autocompleting picture
编辑:这是代码
var scarTable =['F8-2015-0001','F8-2015-0002','F8-2015-0003'] //this is actually populated from a query but I put this in as example data to show the format
$("#reoccuranceId").autocomplete({
source: scarTable,
change: function (event, ui) {
if(!ui.item){
$(this).val("");
}
}
})
下面是修改后的DOM,确实没有填充列表
<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content" id="ui-id-4" tabindex="0" style="display: none; top: 1074px; left: 323px; width: 227px;">
<li class="ui-widget-content ui-menu-divider"></li>
</ul>