日期:2014-05-16  浏览次数:20397 次

ExtJs--border布局

我学习ExtJs主要是从布局开始学习的,现在说的是border布局

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Border 实例</title>
<link rel="stylesheet" style="text/css"
	href="ext/resources/css/ext-all.css" />
<link rel="stylesheet" style="text/css"
	href="ext/resources/css/xtheme-blue.css" />

<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript" src="ext/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
	Ext.onReady(function() {
		new Ext.Viewport({
			layout : "border",
			items : [ {
				region : "north",
				height : 50,
				title : "顶部面板"
			}, {
				region : "south",
				height : 50,
				title : "底部面板"
			}, {
				region : "center",
				title : "中央面板"
			}, {
				region : "west",
				width : 100,
				title : "左边面板"
			}, {
				region : "east",
				width : 100,
				title : "右边面板"
			} ]
		});
	});
</script>
</head>
<body>

</body>
</html>

?设置就按照前面的accordion来设置,所用的ext文件也是一样的

运行就可以看到想要的效果