I have an onclick
attribute on my link:
<a href=# onclick=myFunc(1,2,3)>click</a>
That points to this event handler in JavaScript:
function myFunc(p1,p2,p3) {
//need to refer to the current event object:
alert(evt.type);
}
Since the event object evt is not passed to a parameter, is it still possible to obtain this object?
I tried window.event
and $(window.event)
, but both are undefined
.
Any idea?