成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術(shù)文章
文章詳情頁

javascript - 通過a標(biāo)簽href屬性跳轉(zhuǎn)后臺亂碼問題

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

問題描述

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

頁面代碼

<p class='extra'> <a target='_blank' href='http://m.piao2010.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');//也實(shí)現(xiàn)不了 System.out.println(request.getParameter('title_type'));//輸出 qtListType3=qtbiz.findTypeTitle(request.getParameter('title_type')); request.getSession().setAttribute('qtListType3', qtListType3);return 'problem-more'; }

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

問題解答

回答1:

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

回答2:

需要對 中文進(jìn)行轉(zhuǎn)碼

標(biāo)簽: JavaScript
相關(guān)文章: