Set the element (by ID) to readonly
$('#blockm3').attr('readonly', true);
Disable the element (by ID)
$("#cautionremark").attr("disabled", true);
Change the element (by ID) styles
$("#cautionremark").css({backgroundColor: '#ccc'})
Select element by name (the element is a dropdown, select)
Learn it from here: http://api.jquery.com/attribute-equals-selector/
alert( $('select[name="userstatus"]').val());
No comments:
Post a Comment