Using Id:
jQuery('#id').attr('disabled','disabled'); //Here id is form element id
//Enable the form element
jQuery('#id').removeAttr("disabled");
Using Name:
jQuery('input[name="elementname"]').attr('disabled','disabled'); //Here element name is form element name
//Enable the form element
jQuery('input[name="elementname"]').removeAttr('disabled');
No comments:
Post a Comment