jstree 实现搜索功能 电脑版发表于:2022/3/26 18:33 注意需要在初始化的时候plugins加上search ``` "plugins" : [ "contextmenu", "dnd", "search", "state", "types", "wholerow" ] ``` html: ``` <input type="text" id="search_input" placeholder="请输入信息搜索" /> <div id="tree_3" ></div> ``` js: ``` //树形搜索 $("#search_input").keyup(function () { $('#tree_3').jstree(true).search($('#search_input').val()); }); ``` 官方文档: https://www.jstree.com.cn/demo.html