求助!!! 大家帮帮忙告诉我一段代码的意思啊!万分感谢阿 5
<%StudentDaodao=newStudentDao();StringCID=request.getParameter("textfield");Stringcna...
<%
StudentDao dao = new StudentDao();
String CID = request.getParameter("textfield");
String cname = request.getParameter("textfield2");
if(CID != null){
byte c[] = cname.getBytes("ISO-8859-1");
cname = new String(c);
dao.classup(CID,cname);
response.sendRedirect("classadd.jsp");
}
%> 展开
StudentDao dao = new StudentDao();
String CID = request.getParameter("textfield");
String cname = request.getParameter("textfield2");
if(CID != null){
byte c[] = cname.getBytes("ISO-8859-1");
cname = new String(c);
dao.classup(CID,cname);
response.sendRedirect("classadd.jsp");
}
%> 展开
1个回答
展开全部
StudentDao dao = new StudentDao(); //创建实例对象
//获取文本name为textfield,textfield2的值
String CID = request.getParameter("textfield");
String cname = request.getParameter("textfield2");
//判断CID 是否为空
if(CID != null){
//将cname 中的字符强制编码为 ISO-8859-1
byte c[] = cname.getBytes("ISO-8859-1");
//重新创建对象
cname = new String(c);
dao.classup(CID,cname);
//跳转到classadd.jsp
response.sendRedirect("classadd.jsp");
//获取文本name为textfield,textfield2的值
String CID = request.getParameter("textfield");
String cname = request.getParameter("textfield2");
//判断CID 是否为空
if(CID != null){
//将cname 中的字符强制编码为 ISO-8859-1
byte c[] = cname.getBytes("ISO-8859-1");
//重新创建对象
cname = new String(c);
dao.classup(CID,cname);
//跳转到classadd.jsp
response.sendRedirect("classadd.jsp");
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询