81,092
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/ext-js.jsp"%>
<%
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
%>
<html>
<head>
<script>
Ext.onReady(function(){
proxy = new Ext.data.HttpProxy({
url : "sheldon,jsp"
});
Ext.QuickTips.init();
var cm = new Ext.grid.ColumnModel([
{header:'账号',dataIndex:'loginID'},
{header:'密码',dataIndex:'passwd'},
{header:'邮箱',dataIndex:'email'},
{header:'手机',dataIndex:'phone'}
]);
cm.defaultSortable = true;
ds = new Ext.data.Store({
proxy : proxy,
reader : new Ext.data.JsonReader({
totalProperty : 'totalProperty',
root : 'root'
}, [{
name:'loginID',
mapping:'LoginID'
},{
name:'passwd',
mapping:'Passwd'
},{
name:'email',
mapping:'Email'
},{
name:'phone',
mapping:'Phone'
}
]);
remoteSort : false
});
grid = new Ext.grid.GridPanel({
trackMouseOver : false,
loadMask : {
msg : '正在加载数据,请稍侯……'
},
store : ds,
cm : cm
});
grid.render('div_table');
});
</script>
</head>
<body>
<table>
<tr>
<td>
<div id="div_table"></div><br/>
</td>
</tr>
</table>
</body>
</html>