Javascript, jQuery
To make an input readonly, simply use .prop
$("#fieldName").prop("readonly", true); //or $("#fieldName").attr('readonly','readonly');
To enable the input
$("#fieldName").prop("readonly", false); //or $("#fieldName").removeAttr('readonly');
By Keenlio, May 9, 2014
Your email address will not be published. Required fields are marked *
Name *
Email *
Give an anwser * × 1 = eight
Comment
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Gas Detector Specialist Indonesia Cosmetic Online Malaysia Cosmetic Online
What do you think?