how to disable submit button on form submit using Jquery?

By November 11, 2011 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');
});

Leave a Reply

3 + 1 =

Open chat
💬 Need help?