gpt4 book ai didi

javascript - 在 jquery 自动完成插件中显式调用自动完成函数

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

我有一个文本字段,附加了 jquery 自动完成事件。但是,由于某些原因,我不希望在用户键入时出现搜索结果,而是在按下按钮时出现。我知道这听起来很蹩脚,但我有我的理由。如何通过调用显式函数来触发自动搜索结果的显示?

最佳答案

不确定您使用的是哪个版本的自动完成功能。如果您使用latest version which is rolled into jQueryUI您可以使用搜索方法:

Search :: Signature: .autocomplete( "search" , [value] )

Triggers a search event, which, when data is available, then will display the suggestions; can be used by a selectbox-like button to open the suggestions when clicked. If no value argument is specified, the current input's value is used. Can be called with an empty string and minLength: 0 to display all items.

关于javascript - 在 jquery 自动完成插件中显式调用自动完成函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1539657/

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