[thelist] using JS to alter background colour of form input

Hassan Schroeder hassan at webtuitive.com
Sun Mar 9 08:36:08 CST 2003


Dunstan Orchard wrote:

> Is there any way I can also alter that form input's CSS background colour
> using JS to draw their attention to it?
>
> All the things I've tried, like:
>
> document.getElementById('FirstName').style.background-color.value = "#d6d";

- should be:

document.getElementById('FirstName').style.backgroundColor = "#d6d";

HTH!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.






More information about the thelist mailing list