varTree = $ ("#jstree"). Jstree ({"Core": { "Themes": {"responsive":false }, "Check_callback":true, ' data ': {' URL ': function (node) {return '/test/jstreejson ';}, ' Data ': function (node) {return {' Parent ': 1000}; } } }, "Types": { "Default": {"icon": "FA fa-folder icon-state-warning icon-lg" }, "File": {"icon": "FA fa-file icon-state-warning icon-lg" } }, //"state": {"key": "Demo3"},' Plugins ': ["checkbox", "Types"]}). On ("Changed.jstree",function(E, data) {//Change event}). Bind ("Select_node.jstree",function(E, data) {//Check event}); Gets all selected values and gets the parent value to be selectedfunctionTTT () {varIDArray =NewArray (); $("#jstree"). Find (". jstree-checked,. jstree-undetermined"). each (function() {Idarray.push ($ ( This). Closest (' Li '). attr ("id")); }); IDArray= Idarray.concat ($.jstree.reference ($ ("#jstree")) . get_selected ()); Alert (Idarray.join (‘,‘)); }
Do the website, do the software can findTianma website Construction http://www.tmddd.com/
Jstree advanced use, get all selected values and all selected parent node values