so suppose I call document.getElementsByName("title"); in javascript
and I want to know the type of the tag of the element that is returned by that function, for instance, to see if it’s a meta tag or a div tag or a span tag, etc
how would I go about doing this?
document.getElementsByName("title");returns a set of elements not a single elementso within a cycle you could use
element.tagNameto get the tagbasicly
document.getElementsByName("title")[0].tagNameshould work