<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>SimpleTree Drag&Drop</title>
<link href="tree.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.simple.tree.self.js"></script>
<script type="text/javascript">
var simpleTreeCollection;
$(document).ready(function(){
simpleTreeCollection = $('.simpleTree').simpleTree({
url:'tree.json',
dataType:'json',
check:true,
cascadeType:false,//默认是true 即节点被选中时 其祖先节点和后代节点都被选中
animate:true,
afterClick:function(node){
alert(node.id+"---"+node.text);
if(node.attributes){
alert(node.attributes.p1+"--"+node.attributes.p2);
}
},
afterDblClick:function(node){
//alert("text-"+$('span:first',node).text());
},
afterMove:function(destination, source, pos){
//alert("destination-"+destination.attr('id')+" source-"+source.attr('id')+" pos-"+pos);
},
afterAjax:function()
{
//alert('Loaded');
}
});
$("#selectCheckId").click(function(){
if($("input:checked",".simpleTree").length == 0) {
alert("没有选中节点");
}else{
var nodeid = [];
$("input:checked",".simpleTree").each(function(){
nodeid.push($(this).val());
});
alert(nodeid.join(","));
}
});
});
</script>
</head>
<body>
<div >
<ul id="tree" class="simpleTree">
</ul>
<input type="button" id="selectCheckId" value="选中的节点编号"/>
</div>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SimpleTree Demo.rar (38个子文件)
SimpleTree Demo
tree.html 1KB
asyncTree.html 1KB
tree.css 3KB
tree.json 645B
images
leaf-last.gif 615B
folder_delete.png 666B
expandable-last.gif 670B
plus.gif 167B
page_delete.png 740B
iconCheckDis.gif 126B
expandable.gif 2KB
folder_edit.png 733B
iconCheckAll.gif 123B
cross.png 655B
collapsable-last.gif 655B
arrow_refresh.png 685B
minus.gif 267B
spacer.gif 43B
line_bg_over_last.gif 235B
iconCheckGray.gif 126B
folder_add.png 668B
line_bg_over.gif 251B
Thumbs.db 33KB
iconUncheckAll.gif 111B
spinner.gif 2KB
iconUncheckDis.gif 117B
collapsable.gif 1KB
disk.png 620B
root.gif 1004B
page_add.png 739B
tree_line.gif 197B
leaf.gif 1KB
page_edit.png 807B
line_bg.gif 93B
js
jquery.simple.tree.self.js 19KB
jquery.js 30KB
asynctree.json 685B
checkTree.html 2KB
共 38 条
- 1
victor281004387
- 粉丝: 25
- 资源: 28
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页