日期:2014-05-16 浏览次数:20507 次
<html>
<head>
<link rel="stylesheet" type="text/css" href="./ExtJS4/resources/css/ext-all.css" />
<script type="text/javascript" src="./ExtJS4/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
var treeStore = Ext.create('Ext.data.TreeStore', {
root : {
expanded : true, //根节点默认展开
children : [
{id : '1',text : "节点1 ",leaf : true},
{id : '2',text : "节点2",
children : [
{id : 'book',text : "主任",leaf : true},
{id : 'bt',text : "教师",leaf : true}
]}
]
}
});
var treeP = Ext.create('Ext.tree.Panel', {
store : treeStore,
rootVisible : true,
listeners: {'cellcontextmenu' : tree_event},
renderTo: