Ajax用戶注冊驗證
來源:程序員人生 發(fā)布時間:2014-03-10 23:50:11 閱讀次數(shù):3686次
Ajax用戶注冊驗證 本文章是一款完整的Ajax用戶注冊驗證實例代碼,利用了ajax php實現(xiàn)在用戶輸入完用戶名了就驗證這個用戶名是否被注冊了,然后給出正確的提示。
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=gbk">
- <title>ajax用戶注冊驗</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- <script language="script" type="text/javascript" src="from_ck.js"></script>
- </head>
- <body>
- <div id="reg">
- <h1>ajax用戶注冊驗證</h1>
- <form name="formuser" onsubmit="return register();" action=user.php
- method=post>
- <br>
- <table width="100%" align=center border=0>
- <tbody>
- <tr>
- <td align=right width="15%"><strong>用戶名:</strong></td>
- <td width="57%"><input id="username" onblur="chkusername(this)"
- name="username">
- <span id="username_notice" >*</span></td>
- </tr>
- <tr>
- <td align=right><strong>email:</strong></td>
- <td><input id="email" onblur="checkemail(this)" name="email">
- <span id=email_notice >*</span></td>
- </tr>
- <tr>
- <td align=right><strong>密碼:</strong></td>
- <td><input id="password" onblur="check_password(this)"
- onkeyup="checkintensity(this.value)" type="password" name="password">
- <span
- id=password_notice >*</span></td>
- </tr>
- <tr>
- <td align=right><strong>密碼強度:</strong></td>
- <td><table cellspacing=0 cellpadding=1 width=145 border=0>
- <tbody>
- <tr align=middle>
- <td id=pwd_lower width="33%">弱</td>
- <td id=pwd_middle width="33%">中</td>
- <td id=pwd_high width="33%">強</td>
- </tr>
- </tbody>
- </table></td>
- </tr>
- <tr>
- <td align=right><strong>確認密碼:</strong></td>
- <td><input id="conform_password" onblur="check_conform_password(this)"
- type="password" name="confirm_password">
- <span id=conform_password_notice >*</span></td>
- </tr>
- <tr>
- <td align=right><strong>msn:</strong></td>
- <td><input name=other[msn]> </td>
- </tr>
- <tr>
- <td align=right><strong>qq:</strong></td>
- <td><input name=other[qq]> </td>
- </tr>
- <tr>
- <td align=right><strong>辦公電話:</strong></td>
- <td><input name=other[office_phone]> </td>
- </tr>
- <tr>
- <td align=right><strong>家庭電話:</strong></td>
- <td><input name=other[home_phone]> </td>
- </tr>
- <tr>
- <td align=right><strong>手機:</strong></td>
- <td><input name=other[mobile_phone]> </td>
- </tr>
- <tr>
- <td> </td>
- <td><label>
- <input type="checkbox" checked value="1" name="agreement" onblur="check_agreement(this)">
- <b>我已看過并接受《<a href="#">用戶協(xié)議</a>》<span id=agreement_notice >*</span></b></label></td>
- </tr>
- <tr>
- <td ><input type=hidden value=act_register name=act></td>
- <td ><input type=submit value=確認注冊 name="submit1" class="anniu" disabled></td>
- </tr>
- <tr>
- <td colspan=2> </td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- </body>
- </html>
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學(xué)習(xí)有所幫助,可以手機掃描二維碼進行捐贈