Enable disable all buttons of html form using Jquery

To enable disable all the buttons of html form needs to write lots of code in javascript. In javascript first we need to find all input elements which having input type submit and store it in array. After storing elements in array needs to loop that array and disable or enable element one by one. Instead of writing lots of code we can use Jquery one line code as follows

$('input[type=submit']).attr('disabled',true);

The above Jquery code will disable all input elements which having type submit.

Happy Jquering................

Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

Restore the lost focus of Auto post back controls in asp.net update Panel control

Clone a generic list in C# using extension method

Disable backspace key using Jquery

Add Comma automatically while entering amounts in textbox using Javascript

Step by step migration of ASP.NET Core 2.2 to 3.1

Source Code Beautifier And Format Source Code For Blogger and Websites

Remove Owin from MVC 5 Application and use asp.net custom forms authentication

How to Import CSV File and bind csv file data to gridview in asp.net using c#

Email validation using regular expression in jQuery