转码

import java.net.URLDecoder;
import java.net.URLEncoder;

URLEncoder.encode(request.getParameter("id")==null?"":request.getParameter("id"), "utf-8");

URLDecoder.decode(request.getParameter("id")==null?"":request.getParameter("id"),"utf-8");


js转码

encodeURI(encodeURI('参数'))

转载于:https://my.oschina.net/meSpace/blog/90670

你可能感兴趣的:(转码)