当页面跳转的时候,还是有中文的乱码存在,最后发现我没有写页面的提交方式,

<form action = "show.jsp">
用户名:<input type="text" name = "uname"><br/>
密码:<input type="password" name = "upwd"><br/>
年龄:<input type = "text" name = "uage"><br/>
爱好:<br/>
<input type = "checkbox" name = "uhobbies" value="乒乓球"/>乒乓球
<input type = "checkbox" name = "uhobbies" value="足球"/>足球
<input type = "checkbox" name = "uhobbies" value="篮球"/>篮球<br/>
<input type = "submit" value="注册">
</form>

这就是之前的页面的语句,会出现跳转似的乱码,

<form action = "show.jsp" method="post">
用户名:<input type="text" name = "uname"><br/>
密码:<input type="password" name = "upwd"><br/>
年龄:<input type = "text" name = "uage"><br/>
爱好:<br/>
<input type = "checkbox" name = "uhobbies" value="乒乓球"/>乒乓球
<input type = "checkbox" name = "uhobbies" value="足球"/>足球
<input type = "checkbox" name = "uhobbies" value="篮球"/>篮球<br/>
<input type = "submit" value="注册">
</form>

加上method之后就没有乱码了,好了 问题解决了,原因是:

当我把代码中的post改为get之后,页面的乱码问题又出现了

如果不写指定method的话,默认是使用get方式提交。

get的限制表单的数据集为ASCII码。

而Post支持整个ISO10646字符集,默认是用ISO-8859-1

如果表单不显示的声明method为post,则默认为get。

最新文章

  1. [leetcode] 题型整理之数字加减乘除乘方开根号组合数计算取余
  2. CSS3 perspecitve属性
  3. WP8.1中C++的winodws运行时组件位移操作的差异
  4. .NET平台下的微信SDK(Rabbit.WeiXin)开源发布
  5. The Dataflow Model 论文
  6. LeetCode Basic Calculator
  7. 使用node-webkit开发exe窗口程序
  8. Win7在CMD命令行中使用管理员权限运行命令
  9. DataSet DataTable操作
  10. linux kernel API and google android compile guide
  11. Http协议、线程、线程池
  12. 2013 ACM/ICPC 成都网络赛解题报告
  13. C陷阱与缺陷代码分析之第1章词法陷阱
  14. Object-C iOS纯代码布局 一堆代码可以放这里!
  15. phpadmin增加使得项目能连接数据库
  16. 升级Centos 7/6内核版本到4.12.4的方法
  17. APACHE 安装
  18. 总结Unity 初学者容易犯的编译与运行时错误
  19. Ikki&#39;s Story IV - Panda&#39;s Trick POJ - 3207(水2 - sat 在圈内 还是 在圈外)
  20. linux基础练习题(1)

热门文章

  1. vue3 学习笔记(九)——script setup 语法糖用了才知道有多爽
  2. c# System.Text.Json 精讲
  3. Codeforces 840E - In a Trap(树分块+trie)
  4. Codeforces 983E - NN country(贪心+倍增优化)
  5. CF Edu Round 71
  6. 有关[Http持久连接]的一切,撕碎给你看
  7. python20判断变量是否存在
  8. 学习java的第五天
  9. 游戏案例|Service Mesh 在欢乐游戏的应用演变和实践
  10. Spark基础:(四)Spark 数据读取与保存