AJAX registration page Detection effect two

Source: Internet
Author: User

AJAX registration page Detection effect two

function check_id (id_name,n) {
var sd= "Lifont" +n;
obj = document.getElementById (' +sd+ ');
var reid=/^[wu0391-uffe5]+$/;
var b_id=reid.test (id_name);
if (!b_id) {
Obj.innerhtml= "<li><div id=lifont>input data null</div></div>";
flag[1]=0;
Check_data ();
}
else{
Obj.innerhtml= "<li><div Id=lifont>thank you ok</div></div>";
Checkid (Id_name);
}
}

function number (num,n) {
var sd= "Lifont" +n;
obj = document.getElementById (' +sd+ ');
var renumber=/d{2,4}-d{7,8}|d{7,8}/;
var rn=renumber.test (num);
if (!RN) {

Obj.innerhtml= "<li><div id=lifont>then number is error</div></div>";

}
else{

Obj.innerhtml= "<li><div Id=lifont>thank you ok</div></div>";

}



}



function Check_email (email,n) {
var sd= "Lifont" +n;
obj = document.getElementById (' +sd+ ');
var reemail=/^w+ ([-+.] w+) *@w+ ([-.] w+) *.w+ ([-.] w+) *$/;
var b_email=reemail.test (email);
if (b_email) {
Obj.innerhtml= "<li><div id=lifont>thank you email ok</div></div>";
}
else{
Obj.innerhtml= "<li><div id=lifont>input email error</div></div>";
}
}






var code;
function Createcode ()
{
Code = "";
var codelength = 6;
var checkcode = document.getElementById ("code");
var Selectchar = new Array (0,1,2,3,4,5,6,7,8,9, ' A ', ' B ', ' C ', ' D ', ' E ', ' F ', ' G ', ' H ', ' I ', ' J ', ' K ', ' L ', ' M ', ' N ', ' O ', ' P ', ' Q ' , ' R ', ' S ', ' T ', ' U ', ' V ', ' W ', ' X ', ' Y ', ' Z ';

for (Var i=0;i<codelength;i++)
{


var charIndex = Math.floor (Math.random () *36);
Code +=selectchar[charindex];


}
Checkcode.innerhtml=code;
if (Checkcode)
{
Checkcode.classname= "Code";
Checkcode.value = code;
}
}

Function Show (SID)
{
var sd= "Salshow" +SID;
obj = document.getElementById (' +sd+ ');
if (sid== "2")
{
var show= "  <div id=title><div id=st>1</div></div><div class=thing onmouseOver= This.classname= ' thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# ' onmouseover= ( ' Companyindustry '). Value = ' Architect ' ">architect</a></div><div id=title><div id=st>2 </div></div><div class=thing class=thing onmouseover=this.classname= ' thingtwo ' onmouseOut= This.classname= ' thing ' ><a href=# onmouseover= ' document.getElementById (' companyindustry '). Value = ' Interior Designer ' ">interior designer</a></div><div id=title><div Id=st>3</div></div ><div class=thing class=thing onmouseover=this.classname= ' thingtwo ' onmouseout=this.classname= ' thing ' > <a href=# onmouseover= "document.getElementById (' Companyindustry '). Value = ' Private client '" >private client < /a></div><div id=title><div id=st>4</div></div><div class=thing Class=thing onmouseover=this.classname= ' thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# ' document.getElementById (' Companyindustry '). Value = ' wholesaler ' ">Wholesaler</a> </div><div id= Title><div id=st>5</div></div><div class=thing class=thing onmouseOver=this.className= ' Thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# onmouseover= ' document.getElementById (' Companyindustry '). Value = ' Importer ' ">Importer</a> </div>";
}
else{
var show= "<div id=title><div id=st>1</div></div><div class=thing class=thing onmouseOver= This.classname= ' thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# ' onmouseover= ( ' Salname '). Value = ' Mr ' ">mr</a></div><div id=title><div id=st>2</div></div> <div class=thing class=thing onmouseover=this.classname= ' thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# onmouseover= "document.getElementById (' Salname '). Value = ' Mrs '" >mrs</a></div><div id=title ><div id=st>3</div></div><div class=thing class=thing onmouseover=this.classname= ' Thingtwo ' onmouseout=this.classname= ' thing ' ><a href=# onmouseover= ' document.getElementById (' Salname '). Value = ' Dr ' >Dr</a></div> ';
}
obj.innerhtml = Show;
}

function Send (vid) {
var sd= "Salshow" +vid;
obj = document.getElementById (' +sd+ ');
obj.innerhtml = "";
}

function Gocode ()
{
var Er=document.getelementbyid ("Lifont9")
var inputcode = document.getElementById ("Inputcode"). Value;
Alert (code);
if (Inputcode.length <=0)
{
Alert ("Please,input code value");
Er.innerhtml= "<li><div id=lifont>please,input code value</div></li>";
}
else if (Inputcode!= code)
{
Alert ("Sorry,your Input code Error!");
Er.innerhtml= "<li><div id=lifont>sorry,your input code error!</div></li>";
Createcode ()///?
}
Else
{
Alert ("Thank you input OK");
Er.innerhtml= "<li><div Id=lifont>thank you input ok</div></li>";

}

}


function Dotshow () {
obj = document.getElementById (' noshow ');
var show= "<strong>ENTER</strong>";
obj.innerhtml = Show;
Mywin.create ();
}

  function Cl (ObjID)
{
 var obj = document.getElementById (objid);
 if (typeof (obj = = ' object ')
  obj.style.display = ' none ';
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.