• 第四次


    登录功能  用户名zs 密码123 登录成功  

    要求 有验证码功能  界面要美观

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://"
               + request.getServerName() + ":" + request.getServerPort()
               + path + "/";
    %>
    <%
          String str=request.getParameter("zh");
          String pwd=request.getParameter("mm");
          if(null!=str){
              if(str.equals("zs")&&pwd.equals("123")){
                  pageContext.forward("dl.jsp");
              }else{
                  out.println("您输入的账号或密码有误,请确认后重新输入!");
              }
          }
    %> 
    <!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 action="" method="post"><br>
         账号:
         <input type="text" name="zs"><br>
         密码:
         <input type="password" name=""><br>
         验证码:
         <input type="text" name="yz">
         <img  src="images/21.jfif"/>换一张<br>
         <input type="submit" value="登录">
         </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 'dl.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>
      </body>
    </html>

  • 相关阅读:
    Spark Scala 读取GBK文件的方法
    Mac OS X 系统下自带的文本文件格式转换工具iconv
    报到
    java 字符串中含有双引号" "与单引号' '问题
    div1嵌套div2,div2居中的解决办法
    ionic4 创建 angular项目 ReactNative下载第三方库出错解决Error: EPERM: operation not permitted, rename
    ionic+cordova 创建项目+打包
    jxl读取excel文件异常:Unable to recognize OLE stream 的解决方法
    学习 javascript (一)javascript 简介
    学习 JavaScript (四)核心概念:操作符
  • 原文地址:https://www.cnblogs.com/3469656421aixz/p/14590279.html
Copyright © 2020-2023  润新知