getting type of element in javascript code example
Example: js get element type
// Use the DOM element's 'tagName' property:
var element_type = field.tagName;
// Use the DOM element's 'tagName' property:
var element_type = field.tagName;