Example for using event objects


new style


examples/javascript/event_new.html
<button>Click me</button>
<script>
var btn = document.getElementsByTagName('button')[0];
btn.addEventListener('click', function(e) {
      console.log(e);
   }
);
</script>