deleteinfo.jsp~27~

来自「北大青鸟学生作品」· JSP~27~ 代码 · 共 36 行

JSP~27~
36
字号
<%@page contentType="text/html; charset=GBK"%>
<%request.setCharacterEncoding("gbk");%>
<html>
<head>
<title>修改页面</title>
</head>
<body bgcolor="#c0c0c0">
<%
  String strid = (String) session.getAttribute("id");
  //  request.getSession().setAttribute("id", strid);
  //  request.getSession().getAttribute("id");
  String name = request.getParameter("name");
  String telephone = request.getParameter("telephone");
  if (name.equals("") || telephone.equals("")) {
    out.print("不能为空<br>");
    out.print("<a href='jsp1_xianshi.jsp'>返回</a>");
  }
  try {
    int a = Integer.parseInt(strid);
  }
  catch (Exception ex) {
    out.print("不能为空<br>");
    out.print("<a href='jsp1_xianshi.jsp'>返回</a>");
  }
  boolean f = telbook.SQL_jh.updateInfo(name, telephone, new Integer(strid).intValue());
  if (f) {
    response.sendRedirect("jsp2_xianshi.jsp");
  }
  else {
    System.out.println("不能修改,修改失败!");
    return;
  }
%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?