How can i make a text box readonly
when a button is clicked using JavaScript?
I have tried different scripts like:
document.getElementById("text").readonly="on";
but since readonly is a Boolean i don't think it works.
Would i use document.getElementById
or something else? Can i make all of the text-boxes in a form readonly
using one script or would i need a separate script for each text-box?
Could this be done using CSS?
Thank you!