ajax 註冊頁面檢測效果二

來源:互聯網
上載者:User

ajax 註冊頁面檢測效果二

  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="document.getElementById('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=# onmouseover="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="document.getElementById('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';
}

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.