What is the equivalent to the Element Object in Internet Explorer 9?
if (!Element.prototype.addEventListener) {
Element.prototype.addEventListener = func
As Delan said, you want to use a combination of addEventListener for newer versions, and attachEvent for older ones.
You'll find more information about event listeners on MDN. (Note there are some caveats with the value of 'this' in your listener).
You can also use a framework like jQuery to abstract the event handling altogether.
$("#someelementid").bind("click", function (event) {
// etc... $(this) is whetver caused the event
});