<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="Ext/extjs4.0/resources/css/ext-all.css">
<script type="text/javascript" src="Ext/extjs4.0/bootstrap.js"></script>
<script type="text/javascript" src="Ext/extjs4.0/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:'曲目编号', dataIndex:'music_id'},
{header:'曲目名称', dataIndex:'music_name'},
{header:'作曲家', dataIndex:'composer'},
{header:'演奏乐器', dataIndex:'instrument'}
]);
var data = [
['001', 'Oasis', 'Kotaro Oshio', '吉他'],
['002', 'Classical Gas', 'Tommy.Emmanuel','吉他'],
['003', 'THIS WAY', 'Depapepe', '吉他']
];
var store = new Ext.data.Store({
proxy:new Ext.data.MemoryProxy(data),
reader:new Ext.data.ArrayReader([
{name:'music_id'},
{name:'music_name'},
{name:'composer'},
{name:'instrument'}
])
});
store.load();
var gridPanel = new Ext.grid.GridPanel({
renderTo:'gridPanel',
autoHeight:true,
store:store,
cm:cm
});
});
</script>
</head>
<body>
<div id="gridPanel"></div>
</body>
</html>
倚天杖
当年话下