Which is better?
<form action="javascript:myFunction()">
or
$("#myForm").on("submit", function(){ /* etc. */ });
Is one way better than the other or is it just personal preference?
Which is better?
<form action="javascript:myFunction()">
or
$("#myForm").on("submit", function(){ /* etc. */ });
Is one way better than the other or is it just personal preference?