• 第四次JSP作业2 邮箱验证







    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <FORM NAME="myform" METHOD="POST" action="index2.jsp" onSubmit="return checkLogin()"> <TABLE align="center"> <TR> <TD> <IMG src="images/Snap1.jpg"><DIV style="position:absolute; left: 490px; top: 216px; 356px;"> <TABLE width="100%" height="100%" border=0 cellPadding=0 cellSpacing=0> <TBODY> <TR vAlign=top> <TD width="23%" height=27 align=right class=bld >用户名: </TD> <TD height="27" align=left><INPUT TYPE="text" SIZE="20" NAME="userid"><BR>用户名由字母和数字组成</TD> </TR> <TR vAlign=top> <TD class=bld align=right height=27>密码: </TD> <TD height="27" align=left><INPUT TYPE="password" SIZE="20" NAME="passwd"><BR>密码由字母、数字和下划线组成,至少6位</TD> </TR> <TR vAlign=top> <TD class=bld align=right height=40> </TD> <TD align=left valign="middle"><A href="#"><INPUT name="submit" type="image" src="images/login.gif" width="101" height="22" border="0" ></A> </TD> </TR> </TABLE></DIV> </TD> </TR> </TABLE> </FORM> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <% request.setCharacterEncoding("utf-8"); String id= request.getParameter("userid"); String pwd= request.getParameter("passwd"); if(id.equals("lucky")&&pwd.equals("123456")){ response.sendRedirect("index4.jsp"); }else{ response.sendRedirect("index3.jsp"); } %> <br> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> 你好:lucky <br> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> 登录失败 <br> <a href="index.jsp"> <input type="button" value="重新登录"> </a> <br> </body> </html>

      

  • 相关阅读:
    【从0开始学架构】架构设计三原则
    【Linux网络】端口
    【Python连接数据库】Python连接Teradata数据库-TD SQL Driver 方式(teradatasql包)
    【Python实战】python中含有中文字符无法运行
    【Linux基础】linux updatedb命令
    【Linux基础】查看和更改当前系统字符集(LC_ALL、LC_TYPE和LANG)
    【数据库】ODBC与JDBC
    LNMP安装目录及配置文件位置
    Linux Vi 的使用
    C#VS2017添加ReportViewer控件
  • 原文地址:https://www.cnblogs.com/zf08/p/12605012.html
Copyright © 2020-2023  润新知