当前位置: 代码迷 >> Web前端 >> ext中展示多行bbar/tbar
  详细解决方案

ext中展示多行bbar/tbar

热度:413   发布时间:2012-12-09 10:53:33.0
ext中显示多行bbar/tbar
<script type="text/javascript">
Ext.onReady(function(){
    var oneTbar = new Ext.Toolbar({
        items: ['开始时间',{   
			xtype:'datefield',
			id : 'startDate',
			editable:false,
			height:20,
			format:'Y-m-d'
		},{
			text:'清空',
			handler:function(){
						Ext.getCmp("startDate").setValue("");
					}
		}]
    });
    var twoTbar = new Ext.Toolbar({
        items: ['结束时间',{
			xtype:'datefield',
			id : 'endDate',
			editable:false,
			height:20,
			format:'Y-m-d'
		},{
			text:'清空',
			handler:function(){
						Ext.getCmp("endDate").setValue("");
					}
		}]
    });
	var w = new Ext.Window({
		title:"消息",
       	width:520,
      	height:500,
      	layout: "anchor",
       	buttonAlign:"center",
       	tbar:{
       		xtype: 'container',
        	items: [oneTbar,twoTbar]
       	},
		bbar: {
       		xtype: 'container',
        	items: [oneTbar,twoTbar]
    	}
	});
	w.show();
});
</script>