function getInputElements() { var inputs = document.getElementsByTagName("input"); }
The above code gets all the input
elements on a page which has more than one form. How do I get the input
elements of a particular form using plain JavaScript?
Advertisement
Answer
document.forms["form_name"].getElementsByTagName("input");