how to disable submit button on form submit using Jquery?

Consider we have this HTML form
<form id="check" action="url.php" method="get"
<input name="username" />
<input id="submit" type="submit" />
</form>
Here the jquery code to disable submit button 

$('#check').submit(function(){
$('input[type=submit]', this).attr('disabled', 'disabled');
});

Most Popular

Customize wordpress register form wp_register()

What is difference between get and post method in php

Disable/enable a form element using jQuery?