inputMobile.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <{include file="header.html"}>
  2. <{include file="nav.html"}>
  3. <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
  4. <div class="article_title center">绑定手机号</div>
  5. <div class="clear"></div>
  6. <div class="join_submit_box">
  7. <div class="ac_content center">请输入您的手机号,获得更多活动服务。</div>
  8. <div class="submit_cell"><input name="mobile" type="text" style="text-align:center; padding:0" class="input_style" placeholder="手机号码"></div>
  9. <div class="user_tips center"></div>
  10. <div class="clear"></div>
  11. <div class="common_btn_style3 com_btn_style3"><a class="send" href="javascript:;">确认并发送验证码</a></div>
  12. </div>
  13. <br>
  14. </div>
  15. <{include file="left.html"}>
  16. <script>
  17. KISSY.use('node', function (S, Node) {
  18. var $ = S.all;
  19. $('.send').on('click', function () {
  20. var mobile = S.trim($('input[name=mobile]').val());
  21. if (mobile == '') {
  22. $('.user_tips').html('请输入手机号码');
  23. return false;
  24. }
  25. var regex = /^(13[0-9]|15[0-9]|18[02-9]|14[57])[0-9]{8}$/;
  26. if(!regex.test(mobile)) {
  27. $('.user_tips').html('手机号输入有误,请重新输入');
  28. return false;
  29. }
  30. location.href = '<{$web_cfg.domain}>/member/verifyMobile?mobile='+mobile;
  31. });
  32. });
  33. </script>
  34. <{include file="bottom.html"}>