gpt4 book ai didi

javascript - 将 Jquery AutoComplete 与字典列表结合使用

转载 作者:行者123 更新时间:2023-11-28 13:55:10 45 4
gpt4 key购买 nike

我有一个大约 58040 个单词的字典列表,我不认为 jquery 自动完成可以在浏览器挂起时处理那么多单词。

列表是

words = ['axxx','bxxx','cxxx', an so on];

$(".CreateAddKeyWords input").autocomplete({ source: words });

我是不是做错了什么

还有其他我可以使用的免费工具

编辑

我正在使用.net,我已经从数据库检索了数据,并且可以循环数据服务器端,但是如何将数据发回,如果是json格式,格式应该是什么样子?

最佳答案

Is there another free tool that i can use

是的,您可以从 remote datasource 加载它们,而不是在 HTML 或 javascript 文件中硬编码 58040 个单词。使用 AJAX。基本上,您将有一个服务器端脚本,当使用当前用户输入进行查询时,它将预过滤结果并将其发送到客户端以显示建议。

关于javascript - 将 Jquery AutoComplete 与字典列表结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8420581/

45 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com