ajax参数特殊字符处理与参数过长解决

前端之家收集整理的这篇文章主要介绍了ajax参数特殊字符处理与参数过长解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

特殊字符处理

前台:'&content='+escape(encodeURIComponent(content))

后台:URLDecoder.decode(request.getParameter("content"),"utf-8")


参数过长处理

$.post("<%=basePath%>cmntController/saveComment.do",{"entityId":entityId,"dataid":objectId,"content":content,"replyEmpId":replyEmpId,"replyCommentId":commentId,"atDataArray":atDataArray},function(data){
      	alert('评论成功');
      });
原文链接:https://www.f2er.com/ajax/164699.html

猜你在找的Ajax相关文章