jquery-textcomplete 介绍
jquery-textcomplete 是 一个 jQuery 插件 ,它主要是给Textarea提供了 自动 补完的 功能 。? 可以对多种不同文本 内容 实现 自动 补全的 js 插件 , 包括 @ 用户名 ,文本关键词和 Emoji 关键词等 内容 的 自动 补全。
使用
$('textarea').textcomplete([{
match: /(^|b)(w{2,})$/,
search: function (term,callback) {
var words = ['google','facebook','github','microsoft','yahoo'];
callback($.map(words,function (word) {
return word.indexOf(term) === 0 ? word : null;
}));
},
replace: function (word) {
return word + ' ';
}
}]);
网站地址 : https://yuku.takahashi.coffee/jquery-textcomplete/
GitHub: https://github.com/yuku/jquery-textcomplete
网站描述: 一个 让 textareas 支持 自动 完成的 jQuery 插件
jquery-textcomplete官方网站
官方网站: https://yuku.takahashi.coffee/jquery-textcomplete/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
查看更多关于jquery-textcomplete的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did174595