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

Add Comma automatically while entering amounts in textbox using Javascript