jsTree树控件(基于jQuery, 超强悍)[推荐]

jsTree是基于javascript的一个跨浏览器树控件,功能强大,而且是免费的。

1、支持基于HTML定义、Json、XML方式加载树节点

2、支持拖放,动态增加、删除、重命名树节点

3、支持复选框

4、支持复制、剪切、粘贴树节点,动态刷新树

5、提供足够的回调方法:

    beforechange: function() { log("About to change"); return true },
    beforeopen : function() { log("About to open"); return true },
    beforeclose : function() { log("About to close"); return true },
    beforemove : function() { log("About to move"); return true }, 
    beforecreate: function() { log("About to create"); return true }, 
    beforerename: function() { log("About to rename"); return true }, 
    beforedelete: function() { log("About to delete"); return true }, 
    onselect  : function() { log("Select"); },
    ondeselect : function() { log("Deselect"); },
    onchange  : function() { log("Focus changed"); },
    onrename  : function() { log("Rename"); },
    onmove   : function() { log("Move"); },
    oncopy   : function() { log("Copy"); },
    oncreate  : function() { log("Create"); },
    ondelete  : function() { log("Delete"); },
    onopen   : function() { log("Open"); },
    onopen_all : function() { log("Open ALL"); },
    onclose   : function() { log("Close"); },
    error    : function() { },
    ondblclk  : function() { log("Doubleclick"); TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE); },
    onrgtclk  : function() { log("Rightclick"); },
    onload   : function() { log("Tree loaded"); },
    onfocus   : function() { log("Tree got focus"); },
    ondrop   : function() { log("Foreign node dropped"); }

下载地址http://code.google.com/p/jstree/
文档http://jstree.com/reference/_documentation/1_files.html
例子http://jstree.com/reference/_examples/1_datasources.html

你可能感兴趣的:(JavaScript,jquery,json,浏览器,Google)