I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a <div>
, a <form>
field, a <fieldset>
, etc. How can I achieve this?
I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a <div>
, a <form>
field, a <fieldset>
, etc. How can I achieve this?