大神给解答一下吧~
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<script src="js/jquery-1.8.0.js" type="text/javascript"></script>
<script src="js/jquery-1.8.0-vsdoc.js" type="text/javascript"></script>
<script src="adapter/ext/ext-base.js" type="text/javascript"></script>
<link href="resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script src="ext-all.js" type="text/javascript"></script>
<script type ="text/javascript" language=javascript>
Ext.onReady(function () {
var sm=new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel([
sm,
//定义表格
{header: '学号', dataIndex: 'id', width: 60, sortable: true },
{header:'姓名', dataIndex: 'name', width: 120},
{header:'性别',dataIndex:'sex',width:60},
{header:'年龄',dataIndex:'age',width:60},
{header:'班级',dataIndex:'class',width:60}
]);
var data=[
['1001','韩迪','M','20','软1'],
['1002','李平','F','19','软2'],
['1003','杨那','F','20','软1'],
['1004','郑超','M','21','软2'],
['1005','吴静','F','20','软1'],
];//二维数组
var store = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(data),
reader: new Ext.data.ArrayReader({}, [
{ name: 'id'},
{ name: 'name'},
{ name: 'sex'},
{ name: 'age'},
{ name: 'class'}
])
var grid = new Ext.grid.GridPanel({
renderTo: 'grid',
store: store,
autoHeight: true,
sm:sm,
cm: cm,
bbar:new Ext.PagingToolbar({
pageSiza:10,
store:store,
displayInfo:true,
displayMsg:'显示{0}条记录到第{1}条记录,共{2}条记录',
emptyMsg:'无记录'
})
});
store.load();//初始化数据
});
</script>
</head>
<body>
<div id ='grid'></div>
</body>
</html>
什么都显示不出来,为什么呢......