input输入框模糊提示功能
2017-04-19 17:46
309 查看
主要用到了jQuery.autocomplete函数,定义好一个数组就可以用这个功能了,很方便。
效果:
<!doctype html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script> $(function() { var availableTags = [ "James", "Kobe", "Jordan" ]; $( "#tags" ).autocomplete({ source: availableTags }); }); </script> </head> <body> <div class="ui-widget"> <label for="tags">Tags: </label> <input id="tags"> </div> </body>
效果:
相关文章推荐
- HTML5----input-datalist输入框自己主动提示功能
- 关闭input文本输入框的自动提示功能 设置方法
- HTML5----input-datalist输入框自动提示功能
- javascript input输入框模糊提示功能的实现
- Qt实现输入框,组合框提示,模糊查询,搜索关键字下拉提示功能
- input输入框内提示功能
- Flex有提示功能的TextInput输入框
- 简单代码autocomplete="off"实现禁用input输入框的自动提示功能
- 禁用input文本输入框的自动提示功能
- 禁用input文本输入框的自动提示功能
- 关闭input文本输入框的自动提示功能
- 控制input输入框中提示信息的显示和隐藏的方法
- input输入框鼠标焦点提示信息
- input输入框为空时,添加默认提示jquery插件(转载)
- input输入框下拉提示、js的keyup的实现、
- java面试算法:设计搜索输入框的输入提示功能
- 带提示的input输入框类似html5的 placeholder
- jQuery-input输入框下拉提示层
- html input输入框提示输入内容
- input 提示功能 CSS