久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

javascript - 通過a標簽href屬性跳轉后臺亂碼問題

瀏覽:101日期:2023-11-12 11:00:05

問題描述

通過a標簽href屬性跳轉后臺亂碼問題,試過request.setCharacterEncoding('UTF-8');設置,沒有用。

頁面代碼

<p class='extra'> <a target='_blank' href='http://m.baoyu77737.com/wenda/Qtitle/findTypeTitle?title_type=${qtype.title_type}'>查看更多>></a></p>

后臺代碼

@RequestMapping('/findTypeTitle')public String findTypeTitle(Model model,String title_type) throws UnsupportedEncodingException{ request.setCharacterEncoding('UTF-8'); //response.setContentType('text/html; charset=utf-8');//也實現(xiàn)不了 System.out.println(request.getParameter('title_type'));//輸出 qtListType3=qtbiz.findTypeTitle(request.getParameter('title_type')); request.getSession().setAttribute('qtListType3', qtListType3);return 'problem-more'; }

想問問還有沒有其他方法實現(xiàn),解決亂碼問題

問題解答

回答1:

title_type包含中文嗎?參考【W(wǎng)EB】url路徑包含中文和表單get請求包含中文

回答2:

需要對 中文進行轉碼

標簽: JavaScript
相關文章:
主站蜘蛛池模板: 项城市| 锡林浩特市| 富裕县| 渭源县| 沾益县| 德惠市| 清远市| 江油市| 清新县| 会泽县| 汕头市| 正宁县| 大邑县| 衡东县| 湾仔区| 黎平县| 岫岩| 库尔勒市| 天等县| 广安市| 高要市| 兴仁县| 郯城县| 海淀区| 莱州市| 丹江口市| 沙洋县| 手游| 射阳县| 慈溪市| 海兴县| 合水县| 汝城县| 化州市| 安多县| 合水县| 奉节县| 罗源县| 大理市| 北安市| 且末县|