解码方法
js提交 解码方法,web 前端需要进行转码:
public static String doUrlDecoderStr(String doStr) { try { String resultStr = ""; if( doStr!=null && !"".equals(doStr) && !"undefined".equals(doStr)){ resultStr=new String(doStr.getBytes()); resultStr=java.net.URLDecoder.decode(resultStr,"UTF-8");// } return resultStr; } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return ""; }?