I have a question. is there another input field inside your form? If there is another field, such as a text field, what button actions will be called up when we press Enter inside the text field?
My suggestion is as follows:
<form name="myform" method="get,post" onsubmit="return false;"> <input type="button" value="Home" onclick="submitform(1)" /> <input type="button" value="Reschedule" onclick="submitform(2)" /> <input type="button" value="Cancel" onclick="submitform(3)" /> </form>
in this code, the user must click on the button to submit the form, and pressing the enter key will not lead to any action.
source share