Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
Javascript >> General
how can i Let my visitors choose colors for pages
Visitor Ratings (0) :
Description
Use JavaScript to change the background color using the following command ("#FFFFFF" being the hex representation of the color we want):
document.bgColor = '#FFFFFF';
Code
Select All
<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>
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10