I want the tag name in the alert box.
Suppose I have a structure as below:
<div>
<span>hello span</span>
<p>
This is the paragraph
</p>
</div>
Now I want is that when clicked on the paragraph it will alert as "paragraph". If clicked on the div it will alert as "div". Means I want the tagname in the alert box.