<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="TreePanel.css" rel="stylesheet" type="text/css">
<script type=text/javascript src="common.js"></script>
<script type=text/javascript src="jquery.js"></script>
<script type=text/javascript src="TreePanel.js"></script>
<script type=text/javascript src="china_2_code.js"></script>
</head>
<body>
<input type='button' value='删除当前节点' onclick='deleteNode()'>
<input type='button' value='查看当前节点' onclick='seeFocusNode()'>
<input type='button' value='查看选中节点数' onclick='fChecked()'>
<input type='button' value='添加节点' onclick='addNode()'>
</body>
<script type=text/javascript>
var l0 = new Date().getTime();
tree = new TreePanel({
'root' : root
});
tree.render();
alert( (new Date().getTime()-l0));
function deleteNode(){
var node = tree.focusNode;
if(node){
var parentNode = node.parentNode;
if(parentNode){
parentNode.removeChild(node);
}
}
}
function seeFocusNode(){
var node = tree.focusNode;
if(node!=null){
alert('你选中的是'+ node.attributes.text );
}else{
alert('没有选中节点')
}
}
function addNode(){
var node = tree.focusNode;
if(node!=null){
var text = window.prompt('输入节点名称!','')
if(text){
var newNode = new TreeNode({text:text});
node.appendChild(newNode);
}
}else{
alert('没有选中节点')
}
}
function fChecked(){
alert( tree.getChecked().length );
}
</script>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
TreePanel-test.0.2.rar
共30个文件
gif:24个
js:4个
htm:1个
需积分: 0 7 下载量 119 浏览量
2010-04-20
20:28:35
上传
评论
收藏 59KB RAR 举报
温馨提示
级联树,checkbox 大数据量,支持多种操作 简单易用
资源推荐
资源详情
资源评论
收起资源包目录
TreePanel-test.0.2.rar (30个子文件)
TreePanel.css 2KB
common.js 2KB
jquery.js 22KB
china_2_code.js 942KB
TreePanel.htm 2KB
img
checkbox_0.gif 168B
line.gif 66B
plusbottom.gif 88B
join.gif 69B
musicfolder.gif 633B
folderopen.gif 376B
plus.gif 89B
minus.gif 86B
biao-8.gif 906B
imgfolder.gif 622B
cd.gif 239B
page.gif 1012B
root.gif 1KB
trash.gif 1KB
checkbox_2.gif 181B
nolines_plus.gif 870B
joinbottom.gif 66B
empty.gif 62B
nolines_minus.gif 861B
minusbottom.gif 85B
folder.gif 614B
checkbox_1.gif 174B
question.gif 1KB
globe.gif 1KB
TreePanel.js 18KB
共 30 条
- 1
资源评论
哇哈哈蛤
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功