1.傳遞參數jsp
var url = "*****Test.jsp?param1="+encodeURI(encodeURI(str));//對中文參數進行雙層編碼後再傳遞編碼
或者 url
var url = "*****Test.jsp?param1="+str;spa
encodeURI(encodeURI(url));code
2.接受參數utf-8
decodeRUI('${param.param1}',"utf-8");//對中文參數進行解碼 it
1.傳遞參數jsp
var url = "*****Test.jsp?param1="+encodeURI(encodeURI(str));//對中文參數進行雙層編碼後再傳遞編碼
或者 url
var url = "*****Test.jsp?param1="+str;spa
encodeURI(encodeURI(url));code
2.接受參數utf-8
decodeRUI('${param.param1}',"utf-8");//對中文參數進行解碼 it