I have a form like this:
<form action="" method="post" id="form" name="form" enctype="multipart/form-data"> <input name="action" type="submit" value="Send" /> </form>
I am using the latest jQuery UI Button plugin. The value of the submit button MUST be sent. Is there an easy way to disable the submit button after submitting the form without using additional plugins such as "Block Submission" - http://plugins.jquery.com/project/LockSubmit
Many thanks.
disabled , . , disabled . setTimeout() :
setTimeout()
$("#form").submit(function() { setTimeout(function() { // .prop() requires jQuery 1.6 or higher $("#form :submit").prop("disabled", true); }, 100); });
:). div , .
= "button"
<button type="button" >not submit</button>
do you mean
$('#form').submit(function() {$(this).find('input:[type="submit"]').button({disabled:true})});
?
$('#form').submit(function() { $(this).find('input[type="submit"]').disable(); });
Source: https://habr.com/ru/post/1618833/More articles:R -apply - convert many columns from number to number - classDefined string in Windows PATH causing error - windowsEnlarge NSScrollView at cursor location - cocoaSTART / B with php / node / python script does not work as expected - command-lineDisable form submit button using javascript - javascriptcounting bits through multiple integers ... is there a faster way? - c ++Android OCR: unable to resolve error for getBoundingBox - androidjQuery - Альтернатива цепочке нескольких методов .next() - javascriptthe std :: prom vector throws an exception, but boost :: prom - c ++The maximum size of the call stack when splitting - javascriptAll Articles