手记

Jquery ajax提交表单多个参数的获取

         

var noticeId="${noticeId}";//用el表达式先取得 var userIds = checkBoxValue(); //获取复选框的值 通过方法获取     var url = "${ctx}/stdd/notice/notice-email!sendEmail.action";     alert(userIds);     $.messager.confirm('确认','您确定要:'+msg+' ?',function(r){         if(r){             $.ajax({                 type: "post",                 url: url,                 data: {"noticeId":noticeId,"userIds":userIds},                 beforeSend: function(XMLHttpRequest){                     //ShowLoading();                 },                 success: function(data, textStatus){                     var result = jQuery.parseJSON(data);                         if(result.isok=='T'){                         $.messager.alert('结果', '操作成功'+result.msg, 'info');                           $("#mainForm").submit();                     }else{                         $.messager.alert('结果', '操作失败'+result.msg, 'info');                     }                                    },                 complete: function(XMLHttpRequest, textStatus){                     //HideLoading();                 },                 error: function(){                     //请求出错处理                 }             });

 

0人推荐
随时随地看视频
慕课网APP