Random : colorChange()
Javascript Code
+ 0 likes
Please Register to submit score.
| Average Score | 0.0 (of 0 scores) |
| Date Added | Jan 03, 2009 |
| Last Updated | Jan 03, 2009 |
| Tags | change color javascript random |
Introduction
To Setup:
Edit line:
| Code: |
| b='505050 6633FF 000000 765981 149387 999999 666666 666999 FFF5CF' ; |
| Code: |
| b='color1 color2 color3'; |
To Use:
For specified color change - Your HTML should look like this:
| Code: |
| <div onclick='javascript:colorChange("colorHere", "ID of the Element to change the color of")'> |
For random color change - Your HTML should look like this:
| Code: |
| <div onclick='javascript:colorChange("rand", "ID of the Element to change the color of")'> |
Colors currently MUST have 6 characters - but that's a standard number for a Hex Color Code anyway.
Tested in Firefox and IE.






