Disable input control : attr « jQuery « JavaScript DHTML






Disable input control

     

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
  $(document).ready(function(){
      $("input").attr("disabled", "disabled");

      


  });
    </script>

  </head>
  <body>
   <form>
    <input type="checkbox" name="a" />
    <span>A</span>
    <input type="checkbox" name="b" />
    <span>B</span>
    <input type="checkbox" name="c" checked="checked" />
    <span>C</span>
  </form>



  </body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.Get attribute from tag
2.Get input control type
3.Set Image URL title alt
4.attr(key, fn)
5.Sets src attribute from title attribute on the image.
6.attr(key, value) set a single property to a value, on all matched elements.
7.Finds the title attribute of the first in the page.
8.attr(name): access a property on the first matched element.
9.Disable all form input controls
10.Add attribute and clear attribute
11.Set attribute with the returned function value