:: Forum >> Version 1 >>

adding an attribute to an html tag

how to add a readonly attribute dynamicaly in input tag using javascript
saran
Friday, October 14, 2005
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
Wednesday, October 25, 2006



This topic is archived.

Back to support forum

Forum search