element.onclick = function (event) { event = event || window.event; var target = event.target || event.srcElement; … };