res.jsp
来自「网上服装店 能让用户在该网站上对物品进行上传购买等操作。该设计为原版」· JSP 代码 · 共 37 行
JSP
37 行
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%>
<%@ page import="com.bwm.db.Condb"%>
<% request.setCharacterEncoding("gb2312"); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>找回密码</title>
</head>
<body>
<%
Condb con=new Condb();
String username=request.getParameter("username");
String email=request.getParameter("email");
String question=request.getParameter("question");
String result=request.getParameter("result");
String sql="select * from tb_User where Username='"+username+"' and Email='"+email+"' and Question='"+question+"' and Result='"+result+"'";
ResultSet rs=con.executeQuery(sql);
String password="";
String pass="你的密码是:";
if(rs.next()){
password=rs.getString(4);
%>
<script language="javascript">
alert("<%=pass+password%>");
window.location.href="../index.jsp";
</script>
<%
}else{
out.println("<script language='javaScript'>alert('你输入信息有误');history.back();</script>");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?