test1.jsp<%@ page contentType="text/html; charset=gb2312" %>
<html>
<head>
<title>个人主页</title>
</head>
<body>
<h1>乱码</h1>
<form name=form1 method=post action="">
<input type=text name=boy>
<input type=submit value="提交" name=submit>
</form>
</body>
</html>若第1行编码改为utf-8的话,中文显示正常
test2.jsp<%@ page contentType="text/html; charset=gbk" %><html>
<head><title>测试页面</title>
</head>
<body>
<h1>测试</h1>
<form name=fm action='process.jsp' method=post>
<input type=text name=boy >
<input type=submit name=submit value="提交">
</form>
</body>
</html>若编码改为utf-8,显示乱码太郁闷了哦,咋回事呢
<html>
<head>
<title>个人主页</title>
</head>
<body>
<h1>乱码</h1>
<form name=form1 method=post action="">
<input type=text name=boy>
<input type=submit value="提交" name=submit>
</form>
</body>
</html>若第1行编码改为utf-8的话,中文显示正常
test2.jsp<%@ page contentType="text/html; charset=gbk" %><html>
<head><title>测试页面</title>
</head>
<body>
<h1>测试</h1>
<form name=fm action='process.jsp' method=post>
<input type=text name=boy >
<input type=submit name=submit value="提交">
</form>
</body>
</html>若编码改为utf-8,显示乱码太郁闷了哦,咋回事呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货