jQuery的/ UI自动完成,但只允许存在的话要在输入 [英] jQuery/UI Auto complete but only allow existing words to be typed in
问题描述
希望我正确地解释这一点,我有pdefined的产品清单很长$ P $(产品在我的数据库),我希望用户能够输入和经销商完成的产品,但是如果该产品/字是不是在列表中,我不希望以允许输入其他字符。因此,自动完成将理想阻止其他输入如果输入未在列表中存在。
Hopefully I am explaining this correctly, I have a long predefined list of items (products in my db) and I would like the user to be able to type and auto complete a product, however if that product / word is NOT in the list, I don't want to allow additional characters to be typed. So the auto complete would ideally block additional input if that input does not exist in the list.
请问当前jQuery用户界面/ jQuery插件类似的东西存在吗?还是有MODS的?我想用这种方法来加快产品的选择,而不是返回没有找到页面,如果有人类型的东西。
Does something like that exist for the current jQuery UI / jQuery plugin? Or are there mods? I wish to use this method to speed up product selection, but not return a 'not found' page if someone types in something else.
感谢您提前:)
推荐答案
这自动完成插件< /一>有一个功能,可以测试值,以确保它是在列表中。
This AutoComplete plugin has a function that allows you to test the value to make sure it is in the list.
这篇关于jQuery的/ UI自动完成,但只允许存在的话要在输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!