How do I make a form using JavaScript
You use HTML to make a form, and then use javascript to add programming logic to the form that will validate the information entered.
check out the w3 schools page on html forms to start: http://www.w3schools.com/html/html_forms.asp
I need to make a form in which the form only accept the one specific email ID. How do I declare this in functions of JavaScript.
Here is another w3 schools page that goes over javascript form validation with some examples you can play with through your browser: http://www.w3schools.com/js/js_form_validation.asp
dont rely only on javascript validation, do it on your server too, just saying
This is a good point to mention Tomas.A, but it looks like his assignment is in learning how to use javascript. Javascript can provide client-side validation of data, which can prevent unnecessary and potentially unnecessary and time consuming (depending on the user's connection speed) extra trips between the server and the user's computer. Once the data gets to the server there should always be some sort of server-side authentication as well to prevent against incorrect input, malicious input, etc...
Thank you Corbin, I have done my assignment and it was bit difficult. I was taking JavaScript lightly but now I realize that's different than HTML and JavaScript. Thank you for your help.
Join our real-time social learning platform and learn together with your friends!