<script type="text/javascript">
if (!e) var e = window.event
if (e.target) targ = e.target
else if (e.srcElement) targ = e.srcElement
alert("You clicked on a " + tname + " element.")
<body onmouseup="whichElement(event)">
<p>Click somewhere in the document. An alert box will alert the tag name of the element you clicked on.</p>
<h3>This is a header</h3>
<p>This is a paragraph</p>
<img src="/img/eg_mouse2.jpg" alt="Ball" />