博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
自己用
阅读量:4138 次
发布时间:2019-05-25

本文共 1434 字,大约阅读时间需要 4 分钟。

<html>     

<head>     
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">     
<title>checkbox tree</title>     
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />     
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>     
<script type="text/javascript" src="../../ext-all.js"></script>     
<link rel="stylesheet" type="text/css" href="../../examples/examples.css" />     
<script type="text/javascript" src="../../examples.js"></script>     
<script type="text/javascript">     
Ext.onReady(function(){     
    Ext.BLANK_IMAGE_URL = "../../resources/images/default/s.gif"         
    // shorthand     
    var Tree = Ext.tree;     
         
    var tree = new Tree.TreePanel({     
        el:'tree-div',     
        useArrows:true,     
        autoScroll:true,     
        animate:true,     
        enableDD:true,     
        containerScroll: true,      
        loader: new Tree.TreeLoader({     
            dataUrl:'0005_checkbox_reorder_tree.php'    
        })     
    });     
         
    tree.on('checkchange', function(node, checked) {        
        node.expand();        
        node.attributes.checked = checked;        
        node.eachChild(function(child) {        
            child.ui.toggleCheck(checked);        
            child.attributes.checked = checked;        
            child.fireEvent('checkchange', child, checked);        
        });        
    }, tree);       
    
    // set the root node     
    var root = new Tree.AsyncTreeNode({     
        text: 'Ext JS',     
        draggable:false,     
        id:'source'    
    });     
    tree.setRootNode(root);     
    
    // render the tree     
    tree.render();     
    root.expand();     
});     
</script>     
    
</head>     
<body>     
<h1>Tree</h1>     
<div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"></div>     
    
</body>     
</html>

转载地址:http://lzlvi.baihongyu.com/

你可能感兴趣的文章
RunTime.getRuntime().exec()
查看>>
Oracle 分组排序函数
查看>>
删除weblogic 域
查看>>
VMware Workstation 14中文破解版下载(附密钥)(笔记)
查看>>
日志框架学习
查看>>
日志框架学习2
查看>>
SVN-无法查看log,提示Want to go offline,时间显示1970问题,error主要是 url中 有一层的中文进行了2次encode
查看>>
NGINX
查看>>
Qt文件夹选择对话框
查看>>
1062 Talent and Virtue (25 分)
查看>>
1061 Dating (20 分)
查看>>
1060 Are They Equal (25 分)
查看>>
83. Remove Duplicates from Sorted List(easy)
查看>>
88. Merge Sorted Array(easy)
查看>>
leetcode刷题191 位1的个数 Number of 1 Bits(简单) Python Java
查看>>
leetcode刷题198 打家劫舍 House Robber(简单) Python Java
查看>>
NG深度学习第一门课作业2 通过一个隐藏层的神经网络来做平面数据的分类
查看>>
leetcode刷题234 回文链表 Palindrome Linked List(简单) Python Java
查看>>
NG深度学习第二门课作业1-1 深度学习的实践
查看>>
Ubuntu下安装Qt
查看>>