Question
Sign Up page Your first Name Your last Name Your Email function checkvalidation(){ var name = document.forms[validationForm][firstname].value; var lname =document.forms[validationForm][lastname].value; var email = document.forms[validationForm][emailid].value; if
function checkvalidation(){
var name = document.forms["validationForm"]["firstname"].value;
var lname =document.forms["validationForm"]["lastname"].value;
var email = document.forms["validationForm"]["emailid"].value;
if (name.length<1) {
document.getElementById('showname').innerHTML = " Please Enter Your Name"
document.getElementById('showname').style.color="Red";
}
if(lname.length<1)
{
document.getElementById('showlname').innerHTML ="please enter your lastname";
document.getElementById('showlname').style.color="Red";
}
if (email.length<1) {
document.getElementById('showemail').innerHTML = " Please Enter Your Email ";
document.getElementById('showemail').style.color="Red";
}
if(name.length<1 || lname.length<1 || email.length<1)
{
return false;
}
}
this is form validation with some fields in javascript.
how to store the values of HTML page added by the user in the arrays using objects and how to store the values permanently on local storage?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started