超链接乱码问题解决办法

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 ;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值