- 获取 Amaze UI autocomplete
下载autocomplete文件
- 引入 autocomplete 插件(
dist
目录下的 JS):
<script src="autocomplete.js"></script>
- 初始化 autocomplete:
var str = "This is a native JS of the fuzzy search plug-in there are some features are not perfect is being improved";
var a = autocomplete(document.getElementById("a"),str.split(" "));