• 第四周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>
    <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="login.jsp" method="get" name="登录">
    <h2>登录界面</h2>
    账号:<input id="uname" type="text" name="user"> </br> 密码:<input
    id="upass" type="password" name="psw"></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>
    <head>
    <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>
    <%
    String name = request.getParameter("user");
    String password = request.getParameter("psw");
    if (name.equals("123456") && password.equals("123456")) {
    out.println("我的账号是:" + name );
    out.println("我的密码是:" + password);
    } else {
    out.println("登录失败");
    }
    %>
    </body>
    </html>
  • 相关阅读:
    岭回归和LASSO
    涉及到的知识点有页连接符的使用、批量修改元器件属性等知识
    OrCAD中分立器件的Symbol绘制
    OrCAD来新建原理图工程、设置原理图页面、新建原理图库
    python控制TLP2041高压电源源码(modbus rtu,try捕获异常使用)
    pyqt5分离ui主线程到子线程
    modbus rtu协议
    pcb接地设计
    PSPICE参数扫描+光标跟踪曲线改变+窗口分多个坐标系
    ad 导入logo
  • 原文地址:https://www.cnblogs.com/lqh123456/p/14588560.html
Copyright © 2020-2023  润新知