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 coding...............

Comments

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

    ReplyDelete

Post a Comment

Popular posts from this blog

Implement Logging in CSV file using Nlog in .net core MVC application- part 2

Implement Nlog in .Net core MVC application part 1

Angular User Session Timeout example step by step

Devexpress Datebox date formatting in angular 6 with example

Disable backspace key using Jquery