我使用了Drew Wilson's autocomplete,它制作得非常好,但文档很少。我能够初始化自动完成插件,但我无法获得所选的值。德鲁威尔逊的自动完成帮助!
我尝试使用这样的:
$("#txtReceipient").autoSuggest(data.items, {
minChars: 2,
matchCase: false,
selectedItemProp: "name",
searchObjProps: "name",
selectedValuesProp: "value",
startText: "Type the name of the receipient here"
});
,并试图通过检索值:
alert($('#txtReceipient').val());
我越来越不确定的值作为警报的回报。即时通讯在我的智慧结束。帮帮我!