Get the target of a bubbling event

Ideal way:

el.onclick = function( e ) {
    var target = e.target;
};

IE way:

el.onclick = function( e ) {
    var evt = e || window.event,
        target = evt.target || evt.srcElement;
};

As shown in this hack, IE must get the event through window.event. Also, the target is not available through evt.target, but through evt.srcElement.