Professor Al Fichera
Web Page Design
Practical JavaScripting... Set Background & Foreground Colors
Form Input tag with onMouseOver Changes Colors

 

Change the background color of this page with these buttons.

What makes these buttons work is a little onclick JavaScript in the form input tag, see below for a sample of the code at work here. The first set of buttons is using the document.bgColor statement (background) to change the color of the background for the page. The second set of buttons is using the document.fgColor statement (foreground) to change the color of the text for the page.

 

Change the color of the text on this page with these buttons.

Here's a chance to see how your text could look with the different colored backgrounds. There should be a great deal of contrast so the text can be seen by all your visitors. The second layer of colors could be used for visited hypertext links for your page.

Return to Profal2 Miscellaneous DHTML