1:想要在cookie中存中文:需要用到URLEncoder(在jdkAPI中有介绍)

 cookie中存中文

 

 

Cookie cookie = new Cookie("User",URLEncoder.encode(要编码的参数,"utf-8"));(编码后页面需要解码)

2:页面解码:

用js 解码。

w3c菜鸟教材中  EncoderURL可以完成解码操作:

cookie中存中文

cookie中存中文

cookie中存中文

cookie中存中文

 

</script>

相关文章:

  • 2022-01-09
  • 2022-02-24
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-08-31
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案