日期:2014-05-16 浏览次数:20596 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<script type="text/javascript" src="../ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var data = [['zzz',24,181],['xxx',45,164],['yyy',14,983]];
var tab = function(){
var store =new Ext.data.SimpleStore({
fileds: [
{name:'name'},
{name:'age',type:'Integer'},
{name:'high',type:'Integer'}
]});
store.loadData(data);
var grid =new Ext.grid.GridPanel({
store : store,
columns:[
{id:'name',header:"姓名",width:150,sortable:true,dataIndex:'name'},
{headrt:"年龄",width:50,sortable:true,dataIndex:"age"},
{hrader:"身高",width:50,sortablet:true,dataIndex:"gigh"}
],
stripeRows:true,
autoExpandColumn:'name',
height:800,
width:680,
title:"test"
});
};
var show = Ext.get("btn");
show.center();
show.on("click",tab);
});
</script>
</HEAD>
<BODY>
<button id="btn">show</button>
<div id='ddd'></div>
</BODY>
</HTML>