www.webcodingtech.comCoding Technologies for the Web |
Home | | | Php | | | JavaScript | | | SQL | | | HTML | | | Server Admin | | | Tools | ||
|
|
Change the Background color of the pageThis is a kind of useless piece of JavaScript code, although I suppose it could be useful for something. Whether this is just a waste of time or not, I will present you with the code straightaway, that will allow you to dynamically change the background color of the page.
Here is an example of how to change the background color using the click technique. (The user must click the link to change the background color.)
Now here is the code to make the links to do the mouseover background color changes. Just be sure you add the JavaScript function mentioned above somewhere on the page before making these links.
You can also change the background color when the user simply mouses over a link: The only thing you have to change in the code shown above is to replace the onClick keyword with onMouseOver .
Here is an example.
|
http://www.webcodingtech.com