zoukankan      html  css  js  c++  java
  • Java web实验 Login.jsp session属性设置和获取

    <%@ page language="java" contentType="text/html; charset=UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <script language="javascript">
    function on_submit()
    {//验证数据的合法性
    if (form1.username.value == "")
    {
    alert("用户名不能为空,请输入用户名!");
    form1.username.focus();
    return false;
    }
    if (form1.userpassword.value == "")
    {
    alert("用户密码不能为空,请输入密码!");
    form1.userpassword.focus();
    return false;
    }
    }
    </script>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>用户登录</title>
    </head>
    <body>
    <table aligin="center">
    <form name="form1" method="post" action=" station.jsp " onsubmit="return on_submit()">
    <tr aligin="center">
    <td>
    用户登录
    </td>
    </tr>
    <tr aligin="center">
    <td>
    请输入用户名:<input type="text" name="username" size="20">
    </td>
    </tr>
    <tr aligin="center">
    <td>
    请输入密码:&nbsp;&nbsp;<input type="password" name="userpassword" size="20">
    </td>
    </tr>
    <tr aligin="center">
    <td>
    <input type="submit" value="提交" name="B1">
    <input type="reset" value="全部重写" name="B2">
    </td>
    </tr>
    </form>
    </table>
    </body>
    </html>

  • 相关阅读:
    spring集成quartz
    ScheduledExecutorService
    中国方言输入法Rime入门
    TinyOS实例介绍
    公式输入较好的参考
    USRP IQ信号分析
    法语学习(1)--入门资料推荐
    Python小技巧
    编码知识
    jaspersoft studio colunm header and detail ,detail中显示多列数据
  • 原文地址:https://www.cnblogs.com/meng2/p/7679208.html
Copyright © 2011-2022 走看看