//布局 没有隐藏标示Ext.onReady(function(){
var viewport = new Ext.Viewport({
layout: 'border',
items: [{
title: 'north',
region: 'north',
contentEl: 'north-div',
split: true,
border: true,
collapsible: true,
height: 80,
minSize: 50,
maxSize: 120
}, {
title: 'south',
region: 'south',
contentEl: 'south-div',
split: true,
border: true,
collapsible: true,
height: 80,
minSize: 50,
maxSize: 120
}, {
title: 'east',
region: 'east',
contentEl: 'east-div',
split: true,
border: true,
collapsible: true,
width: 150,
minSize: 120,
maxSize: 200
}, {
title: 'west',
region: 'west',
contentEl: 'west-div',
split: true,
border: true,
collapsible: true,
width: 150,
minSize: 120,
maxSize: 200
}, {
title: 'center',
region: 'center',
contentEl: 'center-div',
split: true,
border: true,
collapsible: true
}]
});
});
在jsp中定义几个div就可以了。
var viewport = new Ext.Viewport({
layout: 'border',
items: [{
title: 'north',
region: 'north',
contentEl: 'north-div',
split: true,
border: true,
collapsible: true,
height: 80,
minSize: 50,
maxSize: 120
}, {
title: 'south',
region: 'south',
contentEl: 'south-div',
split: true,
border: true,
collapsible: true,
height: 80,
minSize: 50,
maxSize: 120
}, {
title: 'east',
region: 'east',
contentEl: 'east-div',
split: true,
border: true,
collapsible: true,
width: 150,
minSize: 120,
maxSize: 200
}, {
title: 'west',
region: 'west',
contentEl: 'west-div',
split: true,
border: true,
collapsible: true,
width: 150,
minSize: 120,
maxSize: 200
}, {
title: 'center',
region: 'center',
contentEl: 'center-div',
split: true,
border: true,
collapsible: true
}]
});
});
在jsp中定义几个div就可以了。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script language="javascript">
Ext.onReady(function(){
new Ext.Viewport({ //实例化布局对象
layout:'border', //声明为border布局
items:[northPanel,southPanel,centerPanel,westPanel]
});
});//头布局
var northPanel = new Ext.BoxComponent({
region:"north",
height:50,
el:"northDiv"
});//底布局
var southPanel = new Ext.BoxComponent({
region:"south",
height:30,
el:"southDiv"
});//中央布局
var centerPanel = new Ext.Panel({
region:'center',
autoScroll: true,
title:'中央面板'
});//左布局
var westPanel = new Ext.Panel({
region:'west',
id:'west-panel',
collapsible: true,
autoScroll: true,
width:180,
title:"左边面板",
split: true,
margins:"0 0 0 0",
layout:'accordion',
layoutConfig:{
animate:true
},
items:[{
title:'EXT控件使用',
border:false
//html:'<div id="tree-div" style="overflow:auto;width:100%;height:100%"></div>'
},{
title:'信息中心',
border:false
//html:'<div id="tree" style="overflow:auto;width:100%;height:100%"></div>'
},{
title:'系统设置',
border:false
//html:'<div id="tree3" style="overflow:auto;width:100%;height:100%"></div>'
}]
});
</script>
</head><body>
<div id="northDiv">顶部面板</div><table id="southDiv" width="100%" height="30" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="75%"> </td>
<td width="25%">版权所有:沈阳昌泰物资公司@2006-2008</td>
</tr>
</table>
</body>
</html>