ITeye博客

js---eavl获取{object ,object}值

sdk4986 · 2013-06-21 15:33 · js · Web前端 · Markdown

//保存操作
        text : lang('l_save'),
        /*id: 'btnsave',*/
        handler : function() {
         ucstarCustomerInfoMainForm.form.doAction('submit',{ //将表单数据提交到服务器
              url : ucstarCustomerInfoFormSaveUrl,
              method : 'post',
              success : function(form, action) {
               ucstarCustomerInfoSearchForm();
               Ext.MessageBox.alert(
                   lang('l_info'),
                   lang('l_message_success'),
                   function(btn) {
                    ucstarCustomerInfoMainFormWin.hide();

                   });
              },
              failure : function(form, action) {

               //在这里的数据格式为{success:true,msg:'发送成功'} ,记住msg的消息一定要打引号。

               var responseRs = action.response.responseText;
               var responseMsg = eval("(" + responseRs + ")");
               var msg = responseMsg.message;
               //alert(msg);
               Ext.MessageBox.alert(lang('l_error'),msg);
               //ucstarCustomerInfoMainFormWin.hide();
              }
             });

        }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。