zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    特效导航栏
    json基础用法
    CSS盒模型以及如何解决边距重叠问题
    JS设置和获取盒模型的宽和高
    太极图
    JS旋转和css旋转
    正则表达式三-元字符
    正则表达式语法二-量词
    逻辑运算符
    字符串和正则的相关方法
  • 原文地址:https://www.cnblogs.com/xf981107/p/12587627.html
Copyright © 2011-2022 走看看