jstree 实例一
来源:互联网 发布:人民银行软件中心待遇 编辑:程序博客网 时间:2024/06/04 20:11
jstree 官方主页:http://www.jstree.com/
主要功能:
支持打开,关闭,重命名,创建,删除节点(通过预先定义好的规则)
支持多种回调函数(onchange, oncreate, ondelete, onload, 等等)
支持拖拉
支持多重选择
支持多种语言
支持主题(可以修改图标,大小和背景等等)
可以支持动态打开和关闭(configurable)
可选的快捷键导航
支持多个树形部件
开始简单实例一:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<script type="text/javascript" src="_lib/jquery.js"></script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<body>
<div id="demo1" class="demo">
<ul>
<li id="phtml_1">
<a href="#">Root node 1</a>
<ul>
<li id="phtml_2">
<a href="#">Child node 1</a>
</li>
<li id="phtml_3">
<a href="#">Child node 2</a>
</li>
</ul>
</li>
<li id="phtml_4">
<a href="#">Root node 2</a>
</li>
</ul>
</div>
<script type="text/javascript" class="source">
$(function () {
$("#demo1").jstree("set_theme","apple");
});
$("#demo1").jstree({
"themes" : {
"theme" : "default",
"dots" : "default",
"icons" : "default"
},
"plugins" : [ "themes", "html_data" ]
});
</script>
简要说明:
1.设置主题:$("#demo1").jstree("set_theme","apple");
2.jsTree 支持三种数据源头:
预先定义好的 HTML -嵌套的列表结构 (html_data)
JSON
XML
3.html协议
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 是必须这样写的,不然出错。
- jstree 实例一
- jstree实例
- jstree 实例二
- jstree 完整实例
- jstree 创建实例注意事项
- jsTree插件简介(一)
- Web开发使用jsTree实例
- jstree插件简介(一)
- jstree使用【一】初次使用
- jstree
- JSTree
- jstree
- jstree
- JSTree
- jsTree
- jstree实例对弹出框的叙述
- jsTree学习(一)——基础
- jsTree操作
- hibernate一级缓存,二级缓存,三级缓存,缓存算法及配置。
- 《见与不见》
- Event Processing
- linux多线程
- Oracle 10g Scheduler 特性
- jstree 实例一
- oracle一些常用的函数(substr,日期加减问题)之我见
- LDA和PLSA的区别
- Qt's Modules
- Tutorial: The best tips & tricks for bash, explained | bash 入门| 极好的bash技艺
- 基于WinPcap的开发中Vs2010的配置
- Android设置文本框单行多行显示
- switch-case 语句的优点和几点注意事项 Java
- 在Android上使用ZXing识别条形码/二维码