Is there a difference between two lines of code in javascript:
<button id='btn1' onclick='do_this();'>Button 1</button>; <button id='btn1' click='do_that();'>Button 2</button>; //some script later function do_this() { alert('this'); } function do_that() { alert('that'); }
source share