<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="animated-dataview.css" />
<script type="text/javascript" src="../ext-all.js"></script>
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
Ext.onReady(main);
function main()
{
function tree_event(node,event)
{
var id=event.data.id;
Ext.Msg.show({
title:'提示',
msg:'你单击了'+id,
});
};
var tree=Ext.create('Ext.tree.Panel',{
title:'树面板简单示例',
renderTo:Ext.getBody(),
height:300,
listeners:{'itemclick':tree_event},
root:{
text:'树根',
expanded:true,
children:[{
id:'1',
text:'aaa',
leaf:true
},
{
id:'2',
text:'bbb',
leaf:true
}]
},
});
};
</script>
<div id="docbody"></div>
<div id="ths"></div>
</body>
</html>
Ext.tree.Panel 点击事件
最新推荐文章于 2018-10-13 13:31:17 发布