• 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>

     

  • 相关阅读:
    ASP.NET MVC 以Stream 下载文件
    ITextSharp 初次接触
    Easyui中tree组件实现搜索定位功能及展开节点定位
    lodop 打印控件的使用
    XML IList<T> TO DataSet TO DataTable 相互转换
    JSONToObejct 问题 part 1
    可以动态添加图片的轮播插件
    防止机器注册
    sqlServer 取每组的前几条数据
    log4net 动态设定日志文件名
  • 原文地址:https://www.cnblogs.com/OldZhao/p/4993021.html
Copyright © 2020-2023  润新知