如何将SQL数据插入自动完成的jQuery列表中
我试图在snippet中修改代码:
https://api.jqueryui.com/autocomplete/autocomplete/
允许我将自动完成列表与SQL查询的结果填充而不是静态。
它将生活在ASP.NET C#页面上。
我的jQuery不太流利,所以也许这很容易,但是任何帮助都将不胜感激。
tnx 〜J
I was trying to modify the code in the snippet:
https://api.jqueryui.com/autocomplete/
to allow me to have the autocomplete list populated with the result of an SQL query instead of static.
It's gonna live on an asp.net c# page.
I'm not very fluent in jQuery so maybe it's an easy one, but any help would be greatly appreciated.
tnx
~j
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想通过 source选项。这是超级简化的片段:
每次用户在自动完成中键入时,请发送请求,然后发送QueryString发送搜索
术语
,例如用户类型'Java':https:// mywebsite .com/getData.php?term = java
You want to get the data via the source option. Here's super simplified snippet:
Everytime the user types in the autocomplete, a request is sent with a querystring to send the search
term
, like if the user types 'java':https://mywebsite.com/getData.php?term=java