javascript validation for login form
<script language="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;
}
}</script><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;
}
}
Also in JavaScript:
- js add element to front of array
- tableau js
- change src of iframe jquery
- Javascript pong game
- javascript construct new object
- javascript get ur
- js string to array
- how to create a variable javascript
- how to navigate with navintems for react-bootstrap without refreshing the whole page
- jquery get value of radio input
- javascript remove underscore and capitalize
- discord.js ticket system stackoverflow
- nuxt client-only component
- download image in nodejs
- how to write to a json file in javascript
- mapbox blurry popup
- js create object from array
- json property becoming small after retriving from .net core controller
- how to access nested objects in javascript
- import jquery into angular 8
- attr hidden to show jquery
- javascript define global variable
- check first two number jquery
- how to print an array in javascript