There are many elements in form, which are represented by, for example, form.element[x];
The type of an element: The type of an element is represented by element.type
With the above understanding, let us now Let’s solve the first solution for non-hidden elements to gain focus:
First define an object as the method’s applicator:
var f=new Object();
Then: