Currently, I am using an with ajax to update my mysql. Now, I have to click on the button with the mouse for it to work (I am using onclick), but how can I make it accept the “enter” button? My guess is… Enter isn’t working because isn’t there. If I leave it there, my ajax just doesn’t move.
Share
Use a
<input type="submit>instead of a<button>ortype="button"and then hook into the forms’onsubmitevent.For example:
The
return falseensures that the browser doesn’t actually submit a form.