现在的位置: 首页 > 综合 > 正文

超链接乱码问题解决办法

2013年06月25日 ⁄ 综合 ⁄ 共 836字 ⁄ 字号 评论关闭

There are two ways to solve the Chinese unreadable code. It is ofen used as common in real projects. (How can I learn in my training time.  Of course, learn from the real project on hand. And 

 


First,add java code in jsp , deal with  your parameter that you want to submit to next jsp like this "n_title = new String(n_title.getBytes("ISO-8859-1"),"utf-8") ;". It means that jsp through HTTP protocol send HttpRequest,and the http head default coding is  "ISO-8859-1", it should be turn into "utf-8" ,or the jsp cannot translate the httprequest code .

Disable case: web page encoding  is not "ISO -8859-1" in some Internet explorer. Then the page will show unreadable codes. 


Second ,create a hidden form .The Hyper Reference trigger a javascript (on click()) that set the parameter into  the form and submit .This method is called hidden form transfer parameters you need instead of Hyper Reference .

Disable case:none. method=post. In HttpRequest body.

 

Using : Search bar;above case;and so on ;

抱歉!评论已关闭.