Possible Duplicate:
JavaScript Event Listeners vs Event Handlers
element.onload vs element.addEventListener(“load”,callbak,false)
I've read this question but it's still unclear to what's the difference between
<input type="button" onclick="call_function();" />
And
$(function() {
$("#my_button").click(function() {
call_function();
});
});
<input type="button" id="my_button" />
The first one is an event handler and the second one is an event listener, am I right?
Is one way better than the other and why? Which one is better at handling graceful degradation?