how to disable submit button in form code example Example: prevent button from submitting form function myFunc(e){ e.preventDefault(); }