List> list=tool.Jdbc.readDB("select * from person where id=?",new Object[]{Integer.parseInt(request.getParameter("id"))});
System.out.println(list);
%>
学号:
>
姓名:
>
String id = request.getParameter("id");
String name = request.getParameter("name");
String str = "";
if ((id == null) || (name == null)) {
str = "请正确输入学号和姓名";
out.print(str);
}else{
try{
int idd=Integer.parseInt(id);
int i=tool.Jdbc.writeDB("update person set name=? where id=?",
new Object[]{name,idd});
if(i==1){
%>
alert("修改成功");
else{
out.print("修改失败");
}
}
catch(Exception e){
out.print("数据入库失败
");
out.print("请正确输入学号和姓名");
}
}
%>
展开