Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does bootstrap enable the submit button again?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report