How can I determine the type of an HTML element in JavaScript?
Asked 2008-10-31T17:29:22.837
349
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?