zoukankan      html  css  js  c++  java
  • 用户注册信息的输入和显示案例

    <!--新用户注册页面register.jsp-->
    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    
    <html>
      <head>    <title>新用户注册</title>  </head>
      
      <body>
      <h3 align="center">新用户注册</h3>
     <form method="POST"action="accept.jsp"name="form1"onsubmit="return on_submit()">
    <table>
     <tr><td>用户名(*):</td><td><input type="text"name="username"size="20"></td><tr>
    <tr><td> 密&nbsp码(*):</td><td><input type="password"name="password"size="20"></td><tr>
    <tr><td> 再输一次密码(*):</td><td><input type="password"name="repassword"size="20"></td><tr>
     <tr><td>性别:</td>
     <td>
        <input type="radio"value="男"checked name="sex">男
        <input type="radio"value="女" name="sex">女
    </td>
    </tr>
     <tr><td>出生年月:</td>
     <td> <input name="year"size="4"maxlength=4>年
     <!-- 下拉列表框 -->
           <select name="month">       
           <option selected>1</option>
           <optin>2</optin>
           <optin>3</optin>
           <optin>4</optin>
           <optin>5</optin>
           <optin>6</optin>
           <optin>7</optin>
           <optin>8</optin>
           <optin>9</optin>
           <optin>10</optin>
           <optin>11</optin>
           <optin>12</optin>
           </select>月
           <input name="day"size="3"maxlength=4>日</td>
           </tr>
       <tr><td>    电子邮箱(*):<td><input name="email"maxlength="28"></td></tr>
          <tr> <td> 家庭住址:</td><td><input type="text"name="address"size="20"></td></tr>
           <tr>
           <td colspan="2"align="center">
               <input type="submit"value="提交"name="B1">  
            <input type="reset"value="全部重写"name="B2">
            </td>
            </tr>
            </table>
            </form>
      </body>
    </html>
    
    
    
    
    <!--接收新用户信息页面accept.jsp-->
    <%@ page contentType="text/html;charset=gb2312" language="java" import="java.util.*" pageEncoding="utf-8"%>
    
    <html>
      <head>    <title>接收新用户注册</title>  </head>
      
      <body>
        这是新用户注册所提交的数据:
        <br>
       <%request.setCharacterEncoding("UTF-8"); %> 
       <br>
        用户名:<%=request.getParameter("username") %><br>
        密码是:<%=request.getParameter("userpassword") %><br>
        性别是:<%=request.getParameter("sex")  %><br>
        出生年月是:<%=request.getParameter("year")+request.getParameter("month")+request.getParameter("day") %><br>
        电子邮箱是:<%=request.getParameter("email") %><br>
        家庭住址是:<%=request.getParameter("address") %><br>
      </body>
    </html>
    

      

    时间最会骗人,但也能让你明白,这个世界上没有什么是不能失去的,留下的尽力珍惜,得不到的都不重要
  • 相关阅读:
    剑指offer4:重建二叉树(后序遍历)
    剑指offer3:从尾到头打印链表每个节点的值
    剑指offer2:C++实现的替换空格(字符中的空格替换为“%20”)
    tp5系统变量输出(可以用来传递搜索的参数)
    Ajax实现文件上传的临时垃圾文件回收策略
    php获取当天的开始时间和结束时间
    Think PHP递归获取所有的子分类的ID (删除当前及子分类)
    tp查找某字段,排除某字段,不用一次写那么多
    git-查看历史版本及回滚版本
    dedecms目录结构,非常全
  • 原文地址:https://www.cnblogs.com/www-x/p/7710057.html
Copyright © 2011-2022 走看看