`
jameszhao83
  • 浏览: 66169 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

extjs panel练习

EXT 
阅读更多
Ext.onReady(function(){
	var pan=new Ext.Panel({
		title:"my panel",
		width:600,
		height:600,
		//添加工具图标
		tools:[{id:"save"},{id:"print",handler:function(){window.print();}}],
		tbar:[{text:"设备详情",handler:function(){
			pan.add({title:"this is new panel"});
			//此语句意思为重新布局面板,当动态添加面板时必须使用该方法
			alert("running here");
//			pan.dolayout();
			pan.doLayout();
			pan.remove("p3")
		}},{text:"设备数量"}],
		bbar:[{text:"上一页"},{text:"下一页"}],
		buttons:[{text:"确定"},{text:"取消"}],
		items:[{id:"p3",title:"this is other panel",width:200,height:300}]
	});
//	pan.render("div1");
	pan.render(document.body);
});

 需注意字符大小写

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics