Tag: materialize

使用jquery ajax中的动态数据实现自动完成

我正在ASP.Net MVC应用程序中使用materialize ui,我正在使用带有动态数据的自动完成控件。 这是我的代码, textsms Autocomplete 这是jquery ajax调用, $(function () { $.ajax({ type: ‘GET’, // your request type url: “/Home/GetData/”, success: function (response) { var myArray = $.parseJSON(response); debugger; $(‘input.autocomplete’).autocomplete({ data: { “Arizona (1)”: null, “Florida (2)”: null, “Georgia (3)”: null, “Hawaii(4)”: null, “Idaho (5)”: null, “Illinois (6)”: null } }); } }); }); 它只能以这种格式接受数据,这是我的回复, […]