uregcheck.js
上传用户:pengwei803
上传日期:2021-02-10
资源大小:3311k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. // JavaScript Document
  2. function CheckUserName(username)
  3. {
  4.   
  5.   var url='check.asp?act=checkusername&username='+username+'';
  6.   var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  7.   xmlhttp.Open("get",url,false);
  8.   xmlhttp.Send();
  9.   //document.getElementById("timer").innerHTML = xmlhttp.responseText;
  10.   if(xmlhttp.readyState==4)
  11.     { //alert('kaishi');
  12.   if(xmlhttp.status==200)
  13.     {  
  14.   if(xmlhttp.responseText=="0")
  15.     {
  16.   //alert(xmlhttp.status);
  17.   document.getElementById("unamechk").innerHTML = '用户名长度不符合2-15或已被注册';
  18.             }
  19.   else
  20.     {
  21.   document.getElementById("unamechk").innerHTML = '恭喜您!该用户名可以注册';
  22.             }
  23. }
  24. }
  25.   //location.reload();
  26.   //alert(xmlhttp.responseText);
  27. }
  28. function PwdConfirm(userpwd,userpwdcfm)
  29. {
  30.   if(userpwdcfm!=userpwd)
  31. {
  32. //alert(xmlhttp.status);
  33.  document.getElementById("upwdcfm").innerHTML = '两次密码输入不相同';
  34.     }
  35.   else
  36.     {
  37.      document.getElementById("upwdcfm").innerHTML = '√';
  38.     }
  39.   //location.reload();
  40.   //alert(xmlhttp.responseText);
  41. }