1.在頁面中對你的URL進行編碼
使用------encodeURI(你要使用的中文參數值)如:...?username"+encodeURI(“小甜甜")
2.在後臺通過解碼來接收該中文參數
使用----String name = new String(request.getParameter("username ").getBytes("iso8859-1"),"utf-8")
3.最好不要在URL中傳遞中文參數
1.在頁面中對你的URL進行編碼
使用------encodeURI(你要使用的中文參數值)如:...?username"+encodeURI(“小甜甜")
2.在後臺通過解碼來接收該中文參數
使用----String name = new String(request.getParameter("username ").getBytes("iso8859-1"),"utf-8")
3.最好不要在URL中傳遞中文參數