I would like to make the HTML input field read-only, but not getting the gray background that appears when I just add the readonly attribute (it should look just like a normal field, it just doesn't allow editing).
Is there a way to implement this in CSS and / or JS, ideally with a class?
Example field:
<input type="text" style="width:96%" class="myClass" />
Thanks so much for any help with this, Tim.
javascript html background-color css readonly
user2571510
source share