Skip to content
javascript
$().ready(function() {
 
    var tree = $('#tree');
    tree.jstree({ 'core': { data: null } });
    
    $("#xreload").on("click", null, function(e) {
        //e.preventDefault();
        var url = $(this).attr("data-url"); //+ "?" + Math.random();
        ajax.get(url, null, "json", function(json) {
        tree.jstree(true).settings.core.data = json;
        tree.jstree(true).refresh();
        //console.debug("reloaded.");
        });
    });
 
});

转换自: https://www.cnblogs.com/atwind/p/5236168.html