JSP+Ext实现CURD, 更简洁明了
关键字:JSP与Ext实现CURD,
Js代码
/*
* MemberManage.js
* @author zuoming99
*/
Ext.onReady(function(){
Ext.QuickTips.init();
var fm = Ext.form;
var sm = new Ext.grid.CheckboxSelectionModel({handleMouseDown: Ext.emptyFn});
var cm = new Ext.grid.ColumnModel([
sm,{
header:'ID',
dataIndex:'id',
width:40
},{
header: "姓名",
dataIndex: 'name',
editor: new fm.TextField({
allowBlank: false
})
},{
header:'性别',
dataIndex:'sex',
width:60,
align:'center',
renderer:function(v){
return '<img src="images/'+v+'.png"/>'+(v=='m'?'男':'女');
},
editor:new fm.ComboBox({
typeAhead: true,
triggerAction: 'all',
transform:'sexSelect',
lazyRender:true,
readOnly:true,
listClass: 'x-combo-list-small'
})
},{
header:'年龄',
dataIndex:'age',
width:50,
align:'right',
renderer:function(v){
var code = '<span style="color:'; &n