日期:2014-05-16 浏览次数:20604 次
var dataString = 'subject=' + paramSubject + '&mailbody=' + paramMailBody; $(function(){ $.ajax({ type: "POST", url: '<%=request.getContextPath()%>/app/xxx/saveDraft.do', data: dataString, processData: false, success: function(){} }); return false; });
var dataStr = "&subject="+subject+"&mailbody="+mailbody; $.ajax({ url:urlPath, data: dataStr, type:'POST', dataType:'json', contentType:'application/x-www-form-urlencoded', success:function(data, status, xhr) { }, error:function(xhr,error,exception) { exception.toString(); } });
Content-Type application/x-www-form-urlencoded;charset=UTF-8
request.setCharacterEncoding("UTF-8");
var dataString = 'subject=' + encodeURIComponent(paramSubject) + '&mailbody=' + encodeURIComponent(paramMailBody);
String mailbody = java.net.URLDecoder.decode(mailbody, "UTF-8");