Extjs 4.0.7 中形式窗口的CURD

Extjs 4.0.7 中模式窗口的CURD1、定义formmodal: true,//设定为模态窗口buttons: [{text: Send,handler:

Extjs 4.0.7 中模式窗口的CURD

1、定义form

    modal: true,        //设定为模态窗口    buttons: [{        text: 'Send',        handler: function () {            if (form1.getForm().isValid()) {                //弹出效果                Ext.MessageBox.show(                                    {                                        msg: '正在保存,请稍等...',                                        progressText: 'Saving...',                                        width: 300,                                        wait: true,                                        waitConfig: { interval: 200 },                                        icon: 'download',                                        animEl: 'saving'                                    }                                );                setTimeout(function () { }, 1000);                alert('send');                form1.getForm().submit({                    url: '../ashx/TestJobDataSave.ashx',                    //params: { 'job_id': 'job_id', 'job_desc': 'job_desc', 'min_lvl': 'min_lvl', 'max_lvl': 'max_lvl' },  //默认都是以控件名提交参数,如果参数名相同则可以不用该句。                    method: "POST",                    success: function (form, action) { alert('成功返回!'); },                    failure: function (form, action) { alert('返回错误'); }                })            }            else {                alert('Form is not valid !');            }        }    }, {        text: 'Exit',        handler: function () { win.hide(); }    }]