Jump to content

Recommended Posts

Posted

Two JavaScript functions assigned for one field

I have a field ?Email?; the user enters his email for newsletter subscription.

I want to validate this form.

If the user presses the button without entering email, he should have an alert to enter his email.

If he presses the button after given a wrong email, then he should have an alert to write the correct email.

How can I have these two functions on one filed?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...