title: How to know the type of an element when looping through a form?
body: <p>I'm trying to come up with a generic function in Javascript that can loop through the form and clear any element of the form, based on its type.</p>
  
  <p>In order to get this done, I wanted to know dynamically what kind of form element I'm dealing with, including, but not only, selects, input texts, text areas, input buttons....</p>
  
  <p>So, how can I differentiate between these elements, so I can deal with each type in a proper way?</p>