一個註冊頁面的源碼,有簡訊驗證,頁面源碼簡訊驗證

來源:互聯網
上載者:User

一個註冊頁面的源碼,有簡訊驗證,頁面源碼簡訊驗證

<html xmlns="http://www.w3.org/1999/xhtml"><head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    <title>註冊</title></head><body><h1 align="center">註冊頁面</h1><!-- <form name="reg" action="#" method="post" > -->    <table  align="center" valign="middle">        <tr>            <td>手機號:</td>            <td><input name="mobile" type="text" id="mobile" /></td>        </tr>        <tr>            <td>密碼:</td>            <td><input name="password" type="text" id="password" /></td>        </tr>        <tr><td>驗證碼:</td><td><input name="idcode" type="text" id="idcode" /></td><td><input type="button" name="send" value="擷取" onclick=sendSMS() /></td>        </tr>        <tr>            <td></td>            <td><input type="button" name="regster" value="註冊"  style="width:140px;" onclick=registerUser() /></td>        </tr>    </table><!--  </form> --><script src="http://su.bdimg.com/static/superplus/js/lib/jquery-1.10.2_d88366fd.js"></script> <script type="text/javascript" language="javascript">function registerUser() {var mobile = document.getElementById("mobile").value;var password = document.getElementById("password").value;var idcode = document.getElementById("idcode").value;if(mobile==''){alert(" 請輸入電話號碼!");return;}if(password==''){alert(" 請輸入密碼!");return;}if(idcode==''){alert(" 請輸入驗證碼!");return;}$.ajax({          type:'post',              url:'/rs/rs',  data: JSON.stringify({"code":1,"attribute":[{"key": "mobile", "value": mobile},{"key": "password", "value": password},{"key": "idcode", "value": idcode}]}), async:false,        cache:false,          dataType:'json',          success:function(data){if(data.errcode==0){alert("開戶成功");}else{alert(data.detail);}        },error:function(XMLResponse){alert("error");}});  }function sendSMS() {var mobile = document.getElementById("mobile").value;if(mobile==''){window.alert(" 請輸入電話號碼!");return;}$.ajax({          type:'post',              url:'/rs/rs',  data: JSON.stringify({"code":0,"attribute":[{"key": "mobile", "value": mobile}]}), async:false,dataType:'json',        cache:false,        success:function(data){if(data.errcode==0){alert("驗證碼已發送,請在"+data.detail+"s內輸入");}else if(data.errcode==1 ){alert("別著急,驗證碼馬上就來了");}else{alert("驗證碼發送失敗");}        },error:function(XMLResponse){alert("error");}});  }</script></body></html>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.