Afficher un message
Vieux 19/03/2008, 15h06   #2
Neredbojias
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Page background color won't change.

On 19 Mar 2008, wrote:

> Hi all,
>
> I'm altering a page whose background color being set in CSS
> somewhere. But I need to change the background color
> in Javascript. I tried doing so with this:
>
> document.bgcolor = "red";
> alert(document.bgcolor);
>
> When run, the value is apparently set because the alert displays
> "red", however the page itself does not change color.
>
> Anybody know what's going on?


Yes, but it isn't you... "document.bgcolor" is SO wrong it flabbergasts
me! Google for "document.getElementById" and the css setting "background"
for further information.

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds
  Réponse avec citation
 
Page generated in 0,05261 seconds with 9 queries