zoukankan      html  css  js  c++  java
  • 作业 第四 张垚

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <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="buu.jsp" method="post"><br>
                            账号:
         <input type="text" name="zh"><br>
                           密码:
         <input type="password" name="mm"><br>
         <input type="submit" 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("zh");
            String password = request.getParameter("mm");
            if (name.equals("zs") && password.equals("123")) {
                out.println("我的账号是:" + name);
                out.println("我的密码是:" + password);
            } else {
                out.println("登录失败  请重新输入");
            }
        %>
    </body>
    </html>
    

      

     

     

  • 相关阅读:
    Android 沉浸式状态栏的三种实现方式
    大数据量高并发访问的数据库优化方法(一)
    Spring Boot实战:集成Swagger2
    JVM学习之GC常用算法
    java并发面试题
    Java面试处理高并发
    jedis操作redis的几种常见方式总结
    彻底理解数据库事物
    Java集合——HashMap、HashTable以及ConCurrentHashMap异同比较
    HashMap的工作原理
  • 原文地址:https://www.cnblogs.com/ZXCVBNM1314/p/14589898.html
Copyright © 2011-2022 走看看