Why this works in Firefox but not in IE

  • Thread starter Miroslav Stampar [MCSD.NET / Security+]
  • Start date
M

Miroslav Stampar [MCSD.NET / Security+]

I simply want to get event property inside a function. Inside Firefox
this works fine, but in IE event is 'undefined' (in this sample)

Code snippet:

<html>
<body>
<script>
function fja(event){
alert(event.target);
}
document.onclick = fja;
</script>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,734
Latest member
manin

Latest Threads

Top