del.jsp
来自「学生信息管理系统」· JSP 代码 · 共 29 行
JSP
29 行
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>
del
</title>
</head>
<%! Connection conn; %>
<%! Statement stmt; %>
<%! String xuehao;%>
<body bgcolor="#ffffff">
<%
xuehao=request.getParameter("xuehao").trim();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:test");
stmt=conn.createStatement();
stmt.executeUpdate("delete from class where xuehao='"+xuehao+"'");
stmt.close();
conn.close();
}catch(Exception e){
out.print(e);
}
%>
正在删除,请稍后..............<meta http-equiv="refresh" content="2;url=index.jsp">
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?