Java URL編碼解碼

後臺在往前端傳遞html代碼時往往需要對代碼進行編碼和解碼: 其中用到的方法如下: result = java.net.URLDecoder.decode(str, 「UTF-8」); result = java.net.URLEncoder.encode(str, 「UTF-8」); 測試結果如下:
相關文章
相關標籤/搜索