extjs 中 与div混用表格标题不显示
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>可编辑表格editorGridPanel 对普通表格实现可编辑效果 数据源采用一维数组的格式 即json对象的格式</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="ext-2.2/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-2.2/ext-all.js"></script>
</head>
<script type="text/javascript">
Ext.onReady(function(){
var data = [
{id:"1",name:"小王",eamil:"xiaowang@easyjf.com",sex:"男",bornDate:"1991-10-3"},
{id:"1",name:"小李",eamil:"xiaoli@easyjf.com",sex:"男",bornDate:"1991-10-6"},
{id:"1",name:"小兰",eamil:"xiaolan@easyjf.com",sex:"女",bornDate:"1991-10-9"},
{id:"1",name:"小刘",eamil:"xiaoliu@easyjf.com",sex:"男",bornDate:"1991-10-12"}
];
///dataFormat("Y-n-j") Y代表年,n代表月,j代表日
var store = new Ext.data.JsonStore({data:data,fields:["id","name","eamil","sex",{name:"bornDate",type:"date",dateFormat:"Y-n-j"}]});
var model = new Ext.grid.ColumnModel([
{header:"姓名",dataIndex:"name",height:50,sortable:true,editor:new Ext.form.TextField({})},
{header:"电子邮件",dataIndex:"eamil",height:50,width:150,sortable:true,editor:new Ext.form.TextField({})},
{header:"性别",dataIndex:"sex",height:50},
{header:"出生日期",dataIndex:"bornDate",width:120,height:50,renderer:Ext.util.Format.dateRenderer("Y年m月d日")}
]);
var grid = new Ext.grid.EditorGridPanel({
renderTo:"hello",
title:"学生基本信息管理",
width:800,
height:600,
cm:model,
store:store,
autoExpandColumn:"3"
});
});
</script>
<body>
<center>
<div id="hello"></div>
</center>
</body>
</html>
以上代码,将 <div id="hello"></div>放到<center></center>内表头就不显示,这样用虽很笨,但我百思不解为什么会出现这样的问题.请精英们指点一下!