What are three different ways to access a specific form element via JavaScript?

What are three different ways to access a specific form element via JavaScript?



Assigning the form an ID and accessing via document.getElementById().

Assigning the form a name and accessing via the property of the same name on the document object.

Accessing the form from the document.forms collection by index or form name attribute.