test.jsp?test=赌东道
程序如下<%@page contentType="text/html; charset=GB2312"%>
<%!
public static String GBK(String s)
{
String s1 = new String();
try
{
byte abyte0[] = s.getBytes("ISO8859_1");
s1 = new String(abyte0, "gb2312");
}
catch(Exception _ex) { }
return s1;
}
%><%
if (request.getParameter("FuncID")!=null){
String FuncDefID=GBK(request.getParameter("FuncID"));
out.println(FuncDefID);
}
out.println(request.getParameter("FuncID"));
%>
<form action="test.jsp" method="post">
<input type=text name="FuncID">
<input type=submit value="submit">
</form>
程序如下<%@page contentType="text/html; charset=GB2312"%>
<%!
public static String GBK(String s)
{
String s1 = new String();
try
{
byte abyte0[] = s.getBytes("ISO8859_1");
s1 = new String(abyte0, "gb2312");
}
catch(Exception _ex) { }
return s1;
}
%><%
if (request.getParameter("FuncID")!=null){
String FuncDefID=GBK(request.getParameter("FuncID"));
out.println(FuncDefID);
}
out.println(request.getParameter("FuncID"));
%>
<form action="test.jsp" method="post">
<input type=text name="FuncID">
<input type=submit value="submit">
</form>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货