Posted By

omerta83 on 07/08/10


Tagged

javascript jquery


Versions (?)

Enabling or disabling form elements


 / Published in: JavaScript
 

  1. //To disable a form element such as a text input field
  2. $("#myelement").attr("disabled", "disabled");
  3.  
  4. //To re-enable a disabled form element
  5. $("#myelement").removeAttr("disabled");
  6.  

Report this snippet  

You need to login to post a comment.