jQuery插件,表明一个textarea内/自动完成 [英] jQuery plugin that suggests/autocompletes within a textarea
本文介绍了jQuery插件,表明一个textarea内/自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有建议一个jQuery插件/自动完成一个textarea中?
Is there a jQuery plugin that suggests/autocompletes within a textarea?
我要的是建议的话或者像下面的示例图像一个textarea自动完成递上用户文本:
What I want is to have suggested words or autocompleted text proffered to the user in a textarea like the example image below:
推荐答案
那么就有自动完成插件一>的做到了这一点,如果你想从我电子书籍使用 AJAX API <数据库提取数据/ A>包含在jQuery的。
Well there is the autocomplete plugin that does just that, and if you want to pull data from a database I recomment using the ajax API that is included in jQuery.
像这样
$('textarea').keyup(function(){
$.post('ajax/test.php', function(data) {
$('#example').autocomplete(data);
});
});
还记得这只是基本的结构,给你一个想法。
Also remember this is just the basic structure to give you an idea.
PS 我刚刚发现这该应填写您的所有需求。
P.S. I just found this it should fill all your needs.
这篇关于jQuery插件,表明一个textarea内/自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文