Example for using event objects


old style


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