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

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%@ page contentType="text/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    
    </head>
    
    <body>
        <form action="tt.jsp" method="post" name="登录">
            <h2>登录界面</h2>
            账号:<input id="uname" type="text" name="id"> </br> 
            密码:<input id="upass" type="password" name="password"></br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            <input type="submit" value="注册账号">&nbsp;&nbsp;
            <input id="login" type="button" value="登录账号">
        </form>
    
    </body>
    </html>
    
    
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%@ page contentType="text/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <body>
        <%
            String name = request.getParameter("id");
            String password = request.getParameter("password");
            if (name.equals("zs") && password.equals("123")) {
                out.println("我的账号是:" + id);
                out.println("我的密码是:" + password);
            } else {
                out.println("登录失败");
            }
        %>
    </body>
    </html>
  • 相关阅读:
    浏览器
    背景图片设置
    用CSS画平行四边形
    git常用操作
    函数Function
    Object类型的创建和访问
    执行环境及作用域
    传值和传引用
    String类型
    HTML< legend >标签
  • 原文地址:https://www.cnblogs.com/dayttt/p/14590157.html
Copyright © 2011-2022 走看看