Add readonly attribute dynamically to input tag
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Add readonly attribute dynamically to input tag

From: <upersson@consit.dk>
Date: Thu Jun 30 2005 - 13:58:08 CEST

Hi!

When accessing my web page I build up the javascript and html
dynamically. Depending on an parameter I want to set all the fields
(input tags) readonly. How do I do this? Of course I can write if
statements to add different input tags with and without the readonly
attribute. But is it possible to write a javascript that onload search
the page and add readonly to all input tags?

Regards /Ulrika
Received on Tue Oct 18 02:50:21 2005