On form submit disable submit button

jQuery code that disables submit button on form submission:

    $('input[type=submit]', this).attr('disabled', 'disabled');
JavaScript provides an easy way to disable the multiple submission of a form.
<form name="myform" action="/" method="post"
onsubmit="document.getElementById('submit_button').disabled = 1;">
Share this nice post:

One thought on “On form submit disable submit button

Leave a Reply

Your email address will not be published. Required fields are marked *