zoukankan      html  css  js  c++  java
  • jsp第四周作业

    login.jsp
    
    <%@ page language="java" contentType="text/html; charset=UTF-8"
       pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>register</title>
    <style type="text/css" ></style>
    </head>
    <body>
     
    <form action="login.jsp" method="post">
        用户名:<input type="text" name="uname"><br>
        密   码:<input type="password" name="upwd"><br>
        验证码: 
              <input type="text" name="code_text" size="3" /> 
              <img src="/ServletDemoProject/servlet/GetVerificationCodeServlet"
                id="img_src" /> 
              <a href="javascript:_change_verity_code()">换一张</a> <br>
        <input type="submit" value="提交">
    </form>
         
    </body>
    </html>
    
    succes.jsp
    <%@ page contentType="text/html" %>
    <%@ page pageEncoding="utf-8" %>
    
    <html>
    <body bgcolor=cyan>
    <p style="font-family:黑体;font-size:36;color:bule">
    <%        String uname = request.getParameter("uname");
            String upwd = request.getParameter("upwd");
            if(uname.equals("zs")&&upwd.equals("123")){
            out.println("登录成功");
            %>
                 用户名为:<%=uname %><br>
                  密码为:<%=upwd %>
            <%
        }else{
            out.println("登录失败");
    }
     %>
    </body>
    </html>

  • 相关阅读:
    3.28
    03.21
    03.16
    03.15
    03.14小记
    [LC] 96. Unique Binary Search Trees
    [LC] 298. Binary Tree Longest Consecutive Sequence
    [LC] 102. Binary Tree Level Order Traversal
    [LC] 107. Binary Tree Level Order Traversal II
    [LC] 513. Find Bottom Left Tree Value
  • 原文地址:https://www.cnblogs.com/108-com/p/14586788.html
Copyright © 2011-2022 走看看