Website Designers R Us - Home
Let your visitors choose colors for your pages

Maybe you enjoy using bright pink backgrounds for your web pages. Are you sure your visitors can appreciate it? Why not let them choose the background color, or any other document color, for your pages? Checkout the following example:

The basic idea here is to use JavaScript to change the background color using the following command ("#FFFFFF" being the hex representation of the color we want):

 
document.bgColor = '#FFFFFF';
 
If you like the idea, you can have what you see in the above example simply by inserting the following tags in to your page:
 
<form name="test" method="post">

 <input type="button"
     OnClick="document.bgColor = '#FFFFFF';"
       value="White">

 <input type="button"
     OnClick="document.bgColor = '#00FFFF';"
       value="Cyan">

 <input type="button"
     OnClick="document.bgColor = '#FF00FF';"
       value="Purple">

 <input type="button"
     OnClick="document.bgColor = '#FFFF00';"
       value="Yellow">

</form>

To change the color of the text instead, replace bgColor with fgColor. Using linkColor will make the above script change the color of the links and vlinkColor will change the color of the visited links.
Return to Listing

Website Designer R Us has over 12 years of IT experience and a focus on custom website design, web development and web hosting services. Our professional web design services will give your business the look and feel needed to beat your competitors! Our website design services include; web design, website redesign, website maintenance, web development, flash animation, eCommerce, shopping carts, domains, web hosting, search engine optimization, graphic design, logo design, blog writing, script installations & much more!
 Home          ::             About Us          ::             Support            ::             Services            ::             Link Partners          ::             Contact

Copyright © 2006-2007 Website Designers R Us, a DOT Specialist Company. All rights reserved.