Hello,
I answered this post for some other user, but here is some basic page that will do what you want. I will explain it in detail in a bit.
=[start "test.html"]============================
Your Color!!!
=[end]================================
The above script, has a simple button, once clicked (using the onClick event) it will change the color to any color you choose from an input field.
Now lets change the above method to just alternate between black and normal...
Remember, HTML renders colors as HEXADECIMAL format, so you have to be aware that the stuff that the browser spits out is HEX color So replace the above script to be the following:
=[start "script only"]============================
=[end]============================
I documented it as much as I can... Notice, that if you wanted to introduce a condtion saying if color1 == color2, both colors should be saved in HEX. Black = #000000 in hex.. ect..
I hope this helped you a bit.
Good Luck
2006-10-09 18:34:34
·
answer #1
·
answered by ? 6
·
1⤊
0⤋
i always get good javascript help here
http://www.codingforums.com/
2006-10-06 15:34:08
·
answer #2
·
answered by Anonymous
·
0⤊
1⤋