zoukankan      html  css  js  c++  java
  • 11.24作业3

    注册页

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    
    <form action="zuoye33.jsp" method="get">
    
    注册用户<br><br>
    
    设置用户名 &nbsp;&nbsp;   <input name="yhm" type="text" size="16" /><br>
    
    设置密码     &nbsp;&nbsp;&nbsp;&nbsp;   <input name="szmm" type="text" size="16" /><br>
    
    确认密码    &nbsp;&nbsp;&nbsp;&nbsp;   <input name="qrmm" type="text" size="16" /><br>
    
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <input type="submit" value="提交"> 
    &nbsp;&nbsp;&nbsp;     <input type="button" value="关闭" onclick="window.close()">
     
    </form>
    
    </body>
    </html>

    中间页

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    
    <%
    
    String syhm = request.getParameter("yhm");
    
    String sszmm = request.getParameter("szmm");
    
    String sqrmm = request.getParameter("qrmm");
    
    if(sszmm.equals(sqrmm))
    {
        application.setAttribute("syhm", syhm);
    
        application.setAttribute("sszmm", sszmm);
    
        out.print("注册成功!");
    }
    else
    {
        out.print("您输入的密码不一致!");
    }
    
    %>
    <input type="button" value="查看注册信息" onclick="window.open('zuoye333.jsp')">
    
    
    </body>
    </html>

    查看页

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    
    String syhm = new String(application.getAttribute("syhm").toString());
    
    String sszmm = new String(application.getAttribute("sszmm").toString());
    
    out.print("用户名:" + syhm +"<br>" + "密码:" + sszmm);
    
    %>
    
    </body>
    </html>
  • 相关阅读:
    Linux查看程序端口占用情况
    详解大端模式和小端模式
    HDFS之二:HDFS文件系统JavaAPI接口
    HBase之四--(1):Java操作Hbase进行建表、删表以及对数据进行增删改查,条件查询
    HBase之七:事务和并发控制机制原理
    HBase源码分析:HTable put过程
    QueryPerformanceFrequency使用方法--Windows高精度定时计数
    mongoDB的基本使用----飞天博客
    Android使用DOM生成和输出XML格式数据
    黑马程序猿_Java 代理机制学习总结
  • 原文地址:https://www.cnblogs.com/OldZhao/p/4994056.html
Copyright © 2011-2022 走看看