Table of Contents
注册步骤: 1.填写信息 >  2.收电子邮件 > 3.注册成功
阅读淘宝网服务协议
Home Web Front-end HTML Tutorial 使用dreamweaver设计常用注册页面表单验证_html/css_WEB-ITnose

使用dreamweaver设计常用注册页面表单验证_html/css_WEB-ITnose

Jun 21, 2016 am 09:14 AM

网页注册页面验证设计,必须使用dreamweaver的表单来实现,或者spry库。
这里介绍的第一个是最原始的表单验证方式,即没有使用即时验证,需要点击提交按钮才进行验证,也没有使用正则表达式或者AJAX验证,也或者是JQuery的验证,不过这么多验证方式接着第一个后面都会写出来的

1、最原始的注册验证方式,需要通过点击提交按钮才验证

先上图

代码如下:

Html代码 复制代码 收藏代码
1.
2.
3.
4.
5.无标题文档
6.

8.
9.


11.

219.


<tr> 223. </table>

225.


348.

注册步骤: 1.填写信息 >  2.收电子邮件 > 3.注册成功

<tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> </table>
349.
350.
351.
352.

2、正则表达式方式的验证方式【这个验证比较标准而且比较全面,不过也是通过点击提交按钮才进行验证】

本实例可以这样验证

具体代码

1.
2.
3.
4.
5.表单验证类Validator v1
6.
15.
16.
17.

   <form name="theForm" id="demo" method="get" onSubmit="return Validator.Validate(this,2)">  
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>身份证号:</td>  
Copy after login
                   <td><input name="Card" dataType="IdCard" msg="身份证号错误"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>真实姓名:</td>  
Copy after login
                   <td><input name="Name" dataType="Chinese" msg="真实姓名只允许中文"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>ID:</td>  
Copy after login
                   <td><input name="username" dataType="Username" msg="ID名不符合规定"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>英文名:</td>  
Copy after login
                   <td><input name="Nick" dataType="English" require="false" msg="英文名只允许英文字母"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>主页:</td>  
Copy after login
                   <td><input name="Homepage" require="false" dataType="Url"   msg="非法的Url"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>密码:</td>  
Copy after login
                   <td><input name="Password" dataType="SafeString"   msg="密码不符合安全规则" type="password"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>重复:</td>  
Copy after login
                   <td><input name="Repeat" dataType="Repeat" to="Password" msg="两次输入的密码不一致" type="password"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>信箱:</td>  
Copy after login
Copy after login
                   <td><input name="Email" dataType="Email" msg="信箱格式不正确"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>信箱:</td>  
Copy after login
Copy after login
                   <td><input name="Email" dataType="Repeat" to="Email" msg="两次输入的信箱不一致"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>QQ:</td>  
Copy after login
                   <td><input name="QQ" require="false" dataType="QQ" msg="QQ号码不存在"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>身份证:</td>  
Copy after login
                   <td><input name="Card" dataType="IdCard" msg="身份证号码不正确"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>年龄:</td>  
Copy after login
                   <td><input name="Year" dataType="Range" msg="年龄必须在18~28之间" min="18" max="28"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>年龄1:</td>  
Copy after login
                   <td><input name="Year1" require="false" dataType="Compare" msg="年龄必须在18以上" to="18" operator="GreaterThanEqual"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>电话:</td>  
Copy after login
                   <td><input name="Phone" require="false" dataType="Phone" msg="电话号码不正确"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>手机:</td>  
Copy after login
                   <td><input name="Mobile" require="false" dataType="Mobile" msg="手机号码不正确"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>生日:</td>  
Copy after login
                   <td><input name="Birthday" dataType="Date" format="ymd" msg="生日日期不存在"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>邮政编码:</td>  
Copy after login
Copy after login
                   <td><input name="Zip" dataType="Custom" regexp="^[1-9]\d{5}$" msg="邮政编码不存在"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>邮政编码:</td>  
Copy after login
Copy after login
                   <td><input name="Zip1" dataType="Zip" msg="邮政编码不存在"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>操作系统:</td>  
Copy after login
                   <td><select name="Operation" dataType="Require"  msg="未选择所用操作系统" >  
Copy after login
                                   <option value="">选择您所用的操作系统</option>  
Copy after login
                                   <option value="Win98">Win98</option>  
Copy after login
                                   <option value="Win2k">Win2k</option>  
Copy after login
                                   <option value="WinXP">WinXP</option>  
Copy after login
                           </select></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>所在省份:</td>  
Copy after login
                   <td>广东  
Copy after login
                           <input name="Province" value="1" type="radio">  
Copy after login
                           陕西  
Copy after login
                           <input name="Province" value="2" type="radio">  
Copy after login
                           浙江  
Copy after login
                           <input name="Province" value="3" type="radio">  
Copy after login
                           江西  
Copy after login
                           <input name="Province" value="4" type="radio" dataType="Group"  msg="必须选定一个省份" ></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>爱好:</td>  
Copy after login
                   <td>运动  
Copy after login
                           <input name="Favorite" value="1" type="checkbox">  
Copy after login
                           上网  
Copy after login
                           <input name="Favorite" value="2" type="checkbox">  
Copy after login
                           听音乐  
Copy after login
                           <input name="Favorite" value="3" type="checkbox">  
Copy after login
                           看书  
Copy after login
                           <input name="Favorite" value="4" type="checkbox"" dataType="Group" min="2" max="3"  msg="必须选择2~3种爱好"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <td>自我介绍:</td>  
Copy after login
           <td><textarea name="Description" dataType="Limit" max="10"  msg="自我介绍内容必须在10个字之内">中文是一个字</textarea></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <td>自传:</td>  
Copy after login
           <td><textarea name="History" dataType="LimitB" min="3" max="10"  msg="自传内容必须在[3,10]个字节之内">中文是两个字节t</textarea></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td>相片上传:</td>  
Copy after login
                   <td><input name="up" dataType="Filter" msg="非法的文件格式" type="file" accept="jpg, gif, png"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
           <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
                   <td colspan="2"><input name="Submit" type="submit" value="确定提交">  
Copy after login
                           <input onClick="Validator.Validate(document.getElementById('demo'))" value="检验模式1" type="button">  
Copy after login
                           <input onClick="Validator.Validate(document.getElementById('demo'),2)" value="检验模式2" type="button">  
Copy after login
                           <input onClick="Validator.Validate(document.getElementById('demo'),3)" value="检验模式3" type="button"></td>  
Copy after login
           </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   </form>  
Copy after login
141.
名字:

id=“fname” size=“24”>

姓氏:

237.size=“24”>

登录名:

243.size=“24”>
244.(可包含 a-z、0-9 和下划线)

密码:

250.id=“pass” size=“26”>
251.(至少包含 6 个字符)

再次输入密码:

257.class=“register_textBroader” id=“rpass” size=“26”>

电子邮箱:

263.id=“email” size=“24”>(必须包含 @ 字符)

性别:

   <INPUT name="gen" type="radio"   value="男" checked>  
Copy after login
Copy after login
   <INPUT name="gen" type="radio" value="女" class="input">       女  
Copy after login

爱好:

 <LABEL>  
Copy after login
Copy after login
Copy after login
   <INPUT type="checkbox" name="checkbox" value="checkbox">  
Copy after login
 </LABEL>  
Copy after login
Copy after login
Copy after login
     运动    
Copy after login
 <LABEL>  
Copy after login
Copy after login
Copy after login
 <INPUT type="checkbox" name="checkbox2" value="checkbox">  
Copy after login
 </LABEL>  
Copy after login
Copy after login
Copy after login
   聊天    
Copy after login
 <LABEL>  
Copy after login
Copy after login
Copy after login
   <INPUT type="checkbox" name="checkbox22" value="checkbox">  
Copy after login
 </LABEL>  
Copy after login
Copy after login
Copy after login
   玩游戏  
Copy after login

出生日期:

   <INPUT name="byear" class="register_textBroader"   id="byear" onFocus="this.value=''" value="yyyy"   
Copy after login

295.size=4 maxLength=4 > 年  

      <SELECT name="bmon"  >  
Copy after login
       <OPTION value="" selected>[选择月份]  
Copy after login
        <OPTION value=0>一月  
Copy after login
        <OPTION value=1>二月  
Copy after login
        <OPTION value=2>三月  
Copy after login
        <OPTION value=3>四月  
Copy after login
        <OPTION value=4>五月  
Copy after login
        <OPTION value=5>六月  
Copy after login
        <OPTION value=6>七月  
Copy after login
        <OPTION value=7>八月  
Copy after login
        <OPTION value=8>九月  
Copy after login
        <OPTION value=9>十月  
Copy after login
        <OPTION value=10>十一月  
Copy after login
        <OPTION value=11>十二月   
Copy after login
     </SELECT>&nbsp月&nbsp   
Copy after login
     <INPUT name="bday" class="register_textBroader" id="bday" onFocus="this.value=''" value="dd"   
Copy after login

313.size=2 maxLength=2 >日

   <INPUT type="reset" name="Reset" value=" 重   填 "></TD>  
Copy after login

   <INPUT type="submit" name="Button" value="同意以下服务条款,提交注册信息">  
Copy after login

 <TR>  
Copy after login
Copy after login
   <TD height="36">  
Copy after login
       <h4 id="阅读淘宝网服务协议">阅读淘宝网服务协议 </h4>  
Copy after login
   </TD>  
Copy after login
Copy after login
 </TR>  
Copy after login
Copy after login
 <TR>  
Copy after login
Copy after login
   <TD height="120">  
Copy after login
       <TEXTAREA name="textarea" cols="80" rows="6">  
Copy after login

333.欢迎阅读服务条款协议,本协议阐述之条款和条件适用于您使用Taobao.com网站的各种工具和服务。
334.本服务协议双方为淘宝与淘宝网用户,本服务协议具有合同效力。
335.淘宝的权利和义务
336.1.淘宝有义务在现有技术上维护整个网上交易平台的正常运行,并努力提升和改进技术,使用户网上交易活动的顺利。
337.2.对用户在注册使用淘宝网上交易平台中所遇到的与交易或注册有关的问题及反映的情况,淘宝应及时作出回复。
338.3.对于在淘宝网网上交易平台上的不当行为或其它任何淘宝认为应当终止服务的情况,淘宝有权随时作出删除相关信息、终止服务提

340.供等处理,而无须征得用户的同意。
341.4.因网上交易平台的特殊性,淘宝没有义务对所有用户的注册资料、所有的交易行为以及与交易有关的其他事项进行事先审查。

     </TEXTAREA>  
Copy after login
   </TD>  
Copy after login
Copy after login
 </TR>  
Copy after login
Copy after login

</table>
142.
346.
347.

第三种验证,实际项目中比较常用的(JQuery+AJAX+MD5),属于即时验证,亮点是验证用户是否存在的那一项

具体示例

registe.jsp

Html代码 复制代码 收藏代码
1.%@ page pageEncoding="UTF-8"%
2.%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %
3.%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %
4.
5.
6.
7.注册验证
8.
9.
10.
11.

13.
49.
50.
51.
52.
53.
54.
55.

注册新会员

 <form id="myform" action="account.do?method=registe" method="post">  
Copy after login
       <table width="100%" border="0" cellspacing="5" cellpadding="5">  
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td width="23%" align="right"><span class="redStar">*</span>会员名:</td>  
Copy after login
     <td width="19%">  
Copy after login
       <input name="loginname" class="text" type="text" id="loginname" tabindex="1" size="30" maxlength="20" />  
Copy after login
       <input type="button" value="用户名是否可用" id="lnbtn"/>  
Copy after login
       </td>  
Copy after login
     <td width="58%"><div id="loginnameTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right"><span class="redStar">*</span>密码:</td>  
Copy after login
     <td><input name="pwd" class="text" type="password" id="pwd" tabindex="2" size="30" maxlength="20" /></td>  
Copy after login
     <td><div id="pwdTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right"><span class="redStar">*</span>重复密码:</td>  
Copy after login
     <td><input name="confirm_pwd" class="text" type="password" id="confirm_pwd" tabindex="3" size="30" maxlength="20" /></td>  
Copy after login
     <td><div id="confirm_pwdTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right"><span class="redStar">*</span>邮件地址:</td>  
Copy after login
     <td><input id="email" class="text" tabindex="4" name="email" size="30" type="text" /></td>  
Copy after login
     <td><div id="emailTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td colspan="3" align="right"><div align="center">-------------------------------- 以 下 为 选 填 项 目 ----------------------------------</div></td>  
Copy after login
     </tr>  
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right">真实姓名:</td>  
Copy after login
     <td><input id="username" class="text" name="username" tabindex="5" size="30" type="text" /> </td>  
Copy after login
     <td><div id="usernameTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right">联系电话:</td>  
Copy after login
     <td><input id="phone" class="text" name="phone" tabindex="6" size="30" type="text" /> </td>  
Copy after login
     <td><div id="phoneTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right">手机号码:</td>  
Copy after login
     <td><input id="mobile" class="text" name="mobile" tabindex="7" size="30" type="text" /> </td>  
Copy after login
     <td><div id="mobileTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right">通讯地址:</td>  
Copy after login
     <td><input id="address" class="text" name="address" tabindex="9" size="35" type="text" /> </td>  
Copy after login
     <td><div id="addressTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right">邮政编码:</td>  
Copy after login
     <td><input id="zipCode" class="text" name="zipCode" tabindex="10" size="30" type="text" /> </td>  
Copy after login
     <td><div id="zipCodeTip"></div></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
   <tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
     <td align="right"></td>  
Copy after login
     <td colspan="2"><input type="submit" class="submit" tabindex="11" value="提交注册"/></td>  
Copy after login
   </tr>  
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
 </table>  
Copy after login
 </form>  
Copy after login


122.
123.
124.

126.
127.

AccountServlet.java

Java代码 复制代码 收藏代码
1.package com.validator.test;

3.import java.io.IOException;
4.import java.io.PrintWriter;

6.import javax.servlet.ServletException;
7.import javax.servlet.http.HttpServlet;
8.import javax.servlet.http.HttpServletRequest;
9.import javax.servlet.http.HttpServletResponse;

11.public class AccountServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)

       throws ServletException, IOException {  
Copy after login
Copy after login
   this.doPost(request, response);  
Copy after login

}

public void doPost(HttpServletRequest request, HttpServletResponse response)

       throws ServletException, IOException {  
Copy after login
Copy after login
   String loginname=request.getParameter("loginname");  
Copy after login
   PrintWriter out = response.getWriter();  
Copy after login
   if(loginname.equals("abc123")){  
Copy after login
       out.println("1");  
Copy after login
   }else{  
Copy after login
       out.println("0");  
Copy after login
   }  
Copy after login
   out.flush();  
Copy after login

}

32.}
代码编写完毕,保存表单页
ok.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles