• jsp第五次作业


    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <html>
    <head>
    <style type="text/css">
    body {
        background-image: url('image/Snap1.jpg');
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
    }
    </style>
    
    </head>
    
    <body>
        <div style="margin-left: 750;margin-top: 300">
            <form action="Logindoing.jsp" method="post">
                <table border="0">
                    <tr height="50">
                        <td>用户名:</td>
                        <td><input type="text" name="user">
                        </td>
                    </tr>
                    <tr height="50">
                        <td>密码:</td>
                        <td><input type="password" name="password">
                        </td>
                    </tr>
                    <tr height="50">
                        <td colspan="2" align="center"><input type="submit" value="登录">
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    
    </body>
    </html>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%
        String user = request.getParameter("user");
        String password = request.getParameter("password");
        if (user.equals("lucky") && password.equals("123456")) {
            request.getRequestDispatcher("LoginYes.jsp").forward(request,
                    response);
        } else {
            request.getRequestDispatcher("Login.jsp").forward(request,
                    response);
        }
    %>
    <html>
    <head>
    
    </head>
    
    <body>
    </body>
    </html>
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    
    <html>
    <head>
    <style type="text/css">
    div {
    text-align: center;
    margin-top: 300;
    font-size: 40;
    color:blue
    }
    </style>
    
    </head>
    
    <body>
        <div>你好:Lucky!</div>
    </body>
    </html>

  • 相关阅读:
    php设计模式 -- 数据映射模式
    php 守护进程 (简单)
    php 守护进程
    php rabbitmq demo
    linux 全局安装composer
    linux 安装rabbitmq
    linux php安装RabbitMq扩展
    http和tcp详解
    lnmp环境脚本自动配置
    30.输入年月日,判断它是该年的第多少天
  • 原文地址:https://www.cnblogs.com/xf981107/p/12587627.html
Copyright © 2020-2023  润新知