您的位置:首页 > Web前端 > JavaScript

Extjs常用的控件

2010-01-25 09:17 211 查看
var reportCategory = new Ext.form.ComboBox({
fieldLabel: '报表类型',
hiddenName:'reportCategory1',
store: new Ext.data.SimpleStore({
fields: ['num', 'name'],
data : [[1,'年报表'],[2,'月报表'],[3,'日报表']]
}),
valueField:'num',
displayField:'name',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'请选择...',
selectOnFocus:true,
width:120
});

var dtYear = new Ext.form.NumberField({
fieldLabel:'年',
name:'dtYear1',
allowBlank:false,
allowDecimals:false,
allowNegative:false,
value:2008,
minValue:2000,
maxValue:2100,
selectOnFocus:true,
validationEvent:false,
width:120
});

var dtDay = new Ext.form.DateField({
fieldLabel: '日期',
name: 'dtDay1',
width:120,
validationEvent:false,
allowBlank:false
});

var fs = new Ext.form.FormPanel({
frame: true,
labelAlign: 'right',
labelWidth: 60,
autoHeight:true,
autoWidth:true,
onSubmit: Ext.emptyFn,
submit: function(){
this.getEl().dom.method='POST';
this.getEl().dom.action='search.jsp';
this.getEl().dom.submit();
},
waitMsgTarget: true,
items: reportCategory
});

比如fs需要提交的话 可以这样

fs.getForm().submit();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: