window.local.href编码

ie中window.local.href  传的编码格式在java得到的为null 。如果是中文,   通过此方法new String(request.getParameter("conFig").getBytes("ISO-8859-1"),"gb2312")可以得到。


传递中文也可以用encodeURIComponent ('中文')  对应 utf-8 ,java段取值用    URLDecoder.decode(value, "UTF-8")

猜你喜欢

转载自blog.csdn.net/lhy66/article/details/8784605