LSRONG-双荣设计
扫描二维码添加QQ好友

扫一扫二维码,加我QQ

ECSHOP是如何验证注册email已存在的

2016-03-27 11:03:02ecshop常见问题

ECSHOP 如何验证注册email已存在呢?

1.打开根目录下的js/user.js

2.找到

function checkEmail(email)方法通过调用ajax验证

以下是验证的js方法

function checkEmail(email)
{
  var submit_disabled = false;
 
  if (email == '')
  {
    document.getElementById('email_notice').innerHTML = msg_email_blank;
    submit_disabled = true;
  }
  else if (!Utils.isEmail(email))
  {
    document.getElementById('email_notice').innerHTML = msg_email_format;
    submit_disabled = true;
  }
 
  if( submit_disabled )
  {
    document.forms['formUser'].elements['Submit'].disabled = 'disabled';
    return false;
  }
  Ajax.call( 'user.php?act=check_email', 'email=' + email, check_email_callback , 'GET', 'TEXT', true, true );
}
 

文章关键词