Hello,
i would need some kind of global event handler that is always
triggered when the user clicks on an element within the page. The
handler should be able to gather the element which was clicked.
What strategy suits best for this issue or are there already some
existing functions?
Greetings,
scripts.contact - 31 May 2007 16:39 GMT
On May 31, 8:08 am, Rainer Hahnekamp <rainer.hahnek...@gmail.com>
wrote:
> Hello,
>
> i would need some kind of global event handler that is always
> triggered when the user clicks on an element within the page. The
> handler should be able to gather the element which was clicked.
document.onclick=
function(ev){
ev=ev||event;
var elem=ev.srcElement||ev.target
alert(elem.tagName);
}