1、用post方式提交如何做
在jsp端
//用post方法提交,客戶端需編碼數據,data : encodeURI(spost),
//var spost="commentContent="+commentContent+"&contentId="+contentId;
//spost = encodeURI(spost);
在action端
//用psot方法取值,客戶端需編碼,服務器端需解碼
//String ii = request.getParameter("commentContent");
//ii = java.net.URLDecoder.decode(ii,"utf-8");
2、用get方式
jsp端
type:'GET',不需要處理
action端
String commentContent = new String((request.getParameter("commentContent")).getBytes("ISO-8859-1"),"UT簡單的記錄一下