Category Archive for "JavaScript"

OnSubmit

When using JavaScript to check a form, the first thing you need is the onsubmit event handler. This event handler specifies a script that is executed when the user submits the form. That script is…

Like to share it
Read More

Form methods and properties

JavaScript has a few built-in methods and properties for dealing with forms. Three of them are especially important:                   You can submit a form by using the submit() method. To submit the first form on…

Like to share it
Read More

Accessing the form elements

The form validation script needs to access the form in the HTML page to determine what values the user has filled in. So first we have to enter the form by means of the Level…

Like to share it
Read More

Determining values

Of course, the most important thing is to find out what the user has filled in or checked in the form. At other times you might want to fill in something in the form.             …

Like to share it
Read More

JavaScript – Email Validation script

var emailfilter=/^w+[+.w-]*@([w-]+.)*w+[w-]*.([a-z]{2,4}|d+)$/i function checkmail(e){ var returnval=emailfilter.test(e.value) if (returnval==false){ alert(“Please enter a valid email address.”) e.select() } return returnval } Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP,…

Like to share it
Read More