As you are looping though the elements on your page, you can narrow down your search further by only selecting page elements of a particular type. Step 2.2 — Deconstruct the function. The HTMLFormElement property elements returns an HTMLFormControlsCollection listing all the form controls contained in the