<p>In firefox when you add an onclick event handler to a method an event object is automatically passed to that method. This allows, among other things, the ability to detect which specific element was clicked. For example</p>

<pre><code>document.body.onclick = handleClick;

function handleClick(e)
{
    // this works if FireFox
    alert(e.target.className);
}
</code></pre>

<p>Is there any way to approximate this in IE? i need to be able to detect which element is clicked from an event handler on the body element.</p>

I think IE uses a variable called
```
event
```
. See if that works?