2013年12月12日星期四

js registration verification problems

In the registration interface wrote some js used to verify mailbox format , mobile format , the submit button is written ;, checkall (); I want to achieve such a function , as long as there is a js validation unsuccessful ( eg mail format is incorrect ) , then press submit, form does not submit a form ( ie not submitted to aciton treatment ) . But in the page display Enter the correct mailbox , phone number and the like . Will this checkall () should be how to write ?
------ Solution ---------------------------------------- ----
if ( unsuccessful ) {
return false;
}
------ For reference only --------------------------------- ------
is what I wrote . So write or submitted to the action ah
------ For reference only ------------------------------ ---------
is what I wrote . So write or submitted to the action ah  

code it
------ For reference only -------------------------------- -------
onclick = "checkall ()" checkall submitted method returns true , do not submit returns false .
------ For reference only -------------------------------------- -
  The reply was deleted administrator at 2013-12-12 14:33:37

------ For reference only ---------------------------------- -----
is what I wrote . So write or submitted to the action ah          
  
code it  
function checkall()  //检查所有
{
  
    if(checkname()&&checkuserpassword()&&checkpwdagin()&&checktelephone()&&checkemail())
    {   
        
        return true;
        
    }
    else{
    
    return false;
   }
}

------ For reference only ----------------------------------- ----
what I wrote . So write or submitted to the action ah                
    
code it          
function checkall()  //检查所有
{
  
    if(checkname()&&checkuserpassword()&&checkpwdagin()&&checktelephone()&&checkemail())
    {   
        
        return true;
        
    }
    else{
    
    return false;
   }
}
  know, to be written in the form which onsubmit = "return checkall ()"
------ For reference only --------------- ------------------------
is what I wrote . So write or submitted to the action ah                
    
code it          
function checkall()  //检查所有
{
  
    if(checkname()&&checkuserpassword()&&checkpwdagin()&&checktelephone()&&checkemail())
    {   
        
        return true;
        
    }
    else{
    
    return false;
   }
}
 

your various authentication methods are correct you
------ For reference only ---------------------- -----------------
is what I wrote . So write or submitted to the action ah                      
      
code it                
function checkall()  //检查所有
{
  
    if(checkname()&&checkuserpassword()&&checkpwdagin()&&checktelephone()&&checkemail())
    {   
        
        return true;
        
    }
    else{
    
    return false;
   }
}
         
  
your various authentication methods are right for you   already.

没有评论:

发表评论