How does bootstrap enable the submit button again?
This article mainly introduces how bootstrap re-enables the submit button related knowledge, detailed and easy to understand, simple and fast operation, with certain reference value, I believe that everyone will have a harvest after reading this article how bootstrap re-enables the submit button, let's take a look at it together.
The following code enables the submit button:
$('#loginForm').bootstrapValidator('disableSubmitButtons', false);
Here's a look at the best way to disable the click button in Bootstrap
To prevent multiple button clicks in Bootstrap, you want to disable the button after clicking it.
The specific implementation method is as follows:
//disable button$('button').addClass ('disabled'); // Disables visually$('button').prop ('disabled ', true); // Disables visually + functionally//disable input buttons of type button $('input[type=button]').addClass ('disabled'); // Disables visually$('input[type=button]').prop ('disabled ', true); // Disables visually + functionally//Disable hyperlinks $('a').addClass ('disabled'); // Disables visually$('a').prop('disabled', true); // Does nothing$('a').attr('disabled', 'disabled'); // Disables visually
Write the above method into the click event, such as:
$(".btn-check").click(function () { $('button').addClass('disabled'); // Disables visually$('button').prop('disabled', true); // Disables visually + functionally });
js button is unavailable for a few seconds after clicking
function timer(time) { var btn = $("#sendButton"); btn.attr("disabled", true); //Button disable clicking btn.val(time)