zoukankan      html  css  js  c++  java
  • 11.24作业1

    登陆页

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    
    <form action="zuoye11.jsp" method="get" >
    
    账号 <input name="zhanghao" type="text"  size="16" value="请输出账号"/><br><br>
    
    密码 <input name="mima" type="password"  size="16" /><br>
    
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    
    <input name="tijiao" type="submit" value="提交"/>
    
    &nbsp&nbsp&nbsp&nbsp
    
    <input name="qvxiao" type="button" value="取消"/>
    
    </form>
    
    </body>
    </html>

    错误页 设置账号为123,密码为123。

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    
    String s1 = new String(request.getParameter("mima"));
    
    String s2 = new String(request.getParameter("zhanghao"));
    
    if(s1 != "123" || s2 != "123")
    {
        out.print("您输入的账号和密码有错误");
    }
    
    response.setHeader("refresh","30;URL=zuoye1.jsp");
    
    %>
    
    </body>
    </html>

     

  • 相关阅读:
    jsonp的实现原理和缺点
    vue $set的使用初了解
    js将多维数组转换为一维数组
    微信小程序之页面打开数量限制
    ZOJ 1463 Brackets Sequence
    CSUOJ 1248 非变性聚丙烯酰胺凝胶电泳
    ZOJ 1524 Supermarket
    POJ 1012 Joseph
    ZOJ 1276 Optimal Array Multiplication Sequence
    POJ 1742 Coins
  • 原文地址:https://www.cnblogs.com/OldZhao/p/4993021.html
Copyright © 2011-2022 走看看