var json = []; var cnt = tmpstroe.getCount() for (i = 0; i < cnt; i += 1) { var record = tmpstroe.getAt(i); json.push(record.data); } if (json.length > 0) { Ext.Ajax.request({ url : "XXXX.do?act=SAVE", form : 'PaiCheDanForm', params : { data : Ext.util.JSON.encode(json) }, method : "POST", success : function(response) { var result = Ext.util.JSON .decode(response.responseText); if (result.success) { Ext.Msg.alert("信息", "数据更新成功!"); tmpstroe.commitChanges(); // TODO---保存后对数据处理 // tmpstroe.reload(); } }, failure : function(response) { Ext.Msg.alert("警告", "数据更新失败,请稍后再试!"); } }); } else { Ext.Msg.alert("警告", "没有任何需要更新的数据!"); }