www.webdeveloper.com
Results 1 to 3 of 3

Thread: Trouble changing bgColor

  1. #1
    Join Date
    Feb 2006
    Posts
    27

    Trouble changing bgColor

    when i call this in a function

    Code:
    	document.bgColor = "white";
    it gives me this error, and doesnt change the bgcolor

    Code:
    Warning: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
    how do i get the bgcolor element in an object using getElementById?
    Or how do i make this work?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    document.body.style.backgroundColor='#fff';
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Feb 2006
    Posts
    27
    Thanks dude

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles