7.4 Summary
In this chapter, you learned how to work with forms. You learned how to read values from the different type of form elements, how to validate form data, and how to submit forms. The following are the most important points to remember from this chapter:
-
Forms within a web page can be selected in several ways: via the familiar DOM selection methods, via the forms property of the document object, and via properties of the document object that correspond to the name of the respective form.
-
To avoid having to modify your JavaScript code when making changes regarding the order of forms on a web page, you should usually use DOM selection methods such as getElementById() or querySelector() to select forms.
-
Individual form elements ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access