I\'m trying to get the name of an element in Javascript. Meaning if the element is , then \"div\" would be returned. If it\'s &l
\"div\"
&l
You want element.nodeName Or, within jQuery:
element.nodeName
$(".includeMe").each(function(){ alert(this.nodeName); }); Hello World Don't forget me as well
Don't forget me as well