Answers for "form checking email input javascript"

0

Email validation using javascript

function checkEmail() {

    var email = document.getElementById('txtEmail');
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

    if (!filter.test(email.value)) {
    alert('Please provide a valid email address');
    email.focus;
    return false;
 }
}

- Call the function on Email textbox
Posted by: Guest on May-07-2020
1

form validation for email in js

<script>  
function validateform(){  
var name=document.myform.name.value;  
var password=document.myform.password.value;  
  
if (name==null || name==""){  
  alert("Name can't be blank");  
  return false;  
}else if(password.length<6){  
  alert("Password must be at least 6 characters long.");  
  return false;  
  }  
}
Posted by: Guest on April-29-2020
0

validate email input javascript onchange

<input input type="text" name="txtEmailId" id="txtEmailId" /> 
   <input type="submit" class="button" value="Suscribe" name="Suscribe" 
            onclick="javascript:ShowAlert()" />
Posted by: Guest on July-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language