ext dom 为空或不是对象,大侠帮忙啊!
<scripttype="text/javascript">Ext.onReady(function(){varmytree=newExt.tree.TreePanel(...
<script type="text/javascript">
Ext.onReady(function(){
var mytree=new Ext.tree.TreePanel({
renderTo:"container",//应用到的html元素id
animate:true,//以动画形式伸展,收缩子节点
title:"Extjs静态树",
collapsible:true,
rootVisible:true,//是否显示根节点
autoScroll:true,
autoHeight:true,
width:150,
lines:true,//节点之间连接的横竖线
loader:new Ext.tree.TreeLoader(),//
root:new Ext.tree.AsyncTreeNode({
id:"root",
text:"根节点",//节点名称
expanded:true,//展开
leaf:false,//是否为叶子节点
children:[{text:'子节点一',leaf:true},{id:'child2',text:'子节点二',children:[{text:"111"}]}]
})
});
mytree.render("container");//不要忘记render()下,不然不显示哦
});
</script>
</head>
<body>
<div id="container'">
</div>
</body> 展开
Ext.onReady(function(){
var mytree=new Ext.tree.TreePanel({
renderTo:"container",//应用到的html元素id
animate:true,//以动画形式伸展,收缩子节点
title:"Extjs静态树",
collapsible:true,
rootVisible:true,//是否显示根节点
autoScroll:true,
autoHeight:true,
width:150,
lines:true,//节点之间连接的横竖线
loader:new Ext.tree.TreeLoader(),//
root:new Ext.tree.AsyncTreeNode({
id:"root",
text:"根节点",//节点名称
expanded:true,//展开
leaf:false,//是否为叶子节点
children:[{text:'子节点一',leaf:true},{id:'child2',text:'子节点二',children:[{text:"111"}]}]
})
});
mytree.render("container");//不要忘记render()下,不然不显示哦
});
</script>
</head>
<body>
<div id="container'">
</div>
</body> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询