1.在頁面中對(duì)你的URL進(jìn)行編碼
使用------encodeURI(你要使用的中文參數(shù)值)如:...?username"+encodeURI(“小甜甜")
2.在后臺(tái)通過解碼來接收該中文參數(shù)
使用----String name = new String(request.getParameter("username ").getBytes("iso8859-1"),"utf-8")
3.最好不要在URL中傳遞中文參數(shù)
新聞熱點(diǎn)
疑難解答
圖片精選