(36)Ext.select()函数

Ext.onReady(function(){
	//创建一个panel
	var panel=new Ext.Panel({
		title:"示例",
		renderTo:Ext.getBody(),
		width:'300px',
		html:"<div id='div1' style='height:200px'>我的id是 sub3</div>"
	});
	//通过选择器选择一个唯一的id为DIv1的Element节点
	var e1=Ext.select(["div1"],true,"fat1");
	e1.on("click",function tes(){//为节点e1绑定提示函数,当用户在e1元素内点击时提示
		Ext.Msg.alert("提示","您点击了id为'div1'的节点");
	});
	
});

你可能感兴趣的:((36)Ext.select()函数)