3.2.0

adding an attribute to an html tag

how to add a readonly attribute dynamicaly in input tag using javascript
saran
October 14,
Something like :

document.getElementById('id_of_input_tag').readonly='readonly';

Or maybe you can try to go with "disabled":

<input type="..." disabled="disabled" />

Disabled inputs are still visible to human readers. Even if they're grey'ed as disabled, changing this is just a matter of CSS ;-)
Athanagor Wurlitzer
October 25,

This topic is archived.

See also:


Back to support forum