extjs表单提交例子

时间:2021-08-17 13:46:23
【文件属性】:
文件名称:extjs表单提交例子
文件大小:1KB
文件格式:TXT
更新时间:2021-08-17 13:46:23
extjs 保存提交代码,extjs4.0 // 重置 和 保存 按钮. buttons: [{ text: '重置', handler: function() { this.up('form').getForm().reset(); } }, { text: '保存', /*formBind: true, //only enabled once the form is valid disabled: false,*/ handler: function() { console.log("点击保存"); var formData = Ext .getCmp("msgBasicMsg") .getForm() .getValues(); console.log("表单数据:" + Ext.encode(formData)); Ext.getCmp("msgBasicMsg").getForm().submit({ url : 'insertMsg.action?msgBean=' + formData, //等待时显示 等待 waitTitle : '请稍等...', waitMsg : '正在提交信息...', params : { msgBean:Ext.encode(formData) }, success : function(fp, o) { if (o.result == true) { Ext.MessageBox.alert("信息提示", "保存成功!"); syswin.close(); //关闭窗口 } else { // msg('信息提示', '添加时出现异常!'); } }, failure : function() { msg('信息提示', '添加失败!'); } }); } }]

网友评论