is there any way to change the background
color of a checkbox or a radio-button?
I do not talk about the color /around/ the checkbox
(that will be changed with the background-attribute)
but the color *inside* the checkbox...
THX in advance...
...Frank
>Hello,
>
>is there any way to change the background
>color of a checkbox or a radio-button?
>I do not talk about the color /around/ the checkbox
>(that will be changed with the background-attribute)
>but the color *inside* the checkbox...
>
Try this:
<html>
<head>
<script type="text/javascript">
function changeColor(color)
{
myForm.elements[0].style.background=color
}
</script>
</head>
<body>
<p>This example demonstrates how to change the background color of a
checkbox.</p>
<p>Mouse over the three colored table cells, and the background color
will change:</p>
<table width="100%"><tr>
<td bgcolor="red" onmouseover="changeColor('red')"> </td>
<td bgcolor="blue" onmouseover="changeColor('blue')"> </td>
<td bgcolor="green" onmouseover="changeColor('green')"> </td>
</tr></table>
<form name="myForm">
Mouse over the colors <input checked type="checkbox">
</form>
</body>
</html>
-----------------------------------------------------------------
And this:
<html>
<head>
<script type="text/javascript">
function changeColor(color)
{
myForm.elements[0].style.background=color
}
</script>
</head>
<body>
<p>This example demonstrates how to change the background color of a
radio button.</p>
<p>Mouse over the three colored table cells, and the background color
will change:</p>
<table width="100%"><tr>
<td bgcolor="red" onmouseover="changeColor('red')"> </td>
<td bgcolor="blue" onmouseover="changeColor('blue')"> </td>
<td bgcolor="green" onmouseover="changeColor('green')"> </td>
</tr></table>
<form name="myForm">
Mouse over the colors <input checked type="radio">
</form>
</body>
</html>
----------------------------------------------------
> Try this:
>
> <html>
> <head>
> <script type="text/javascript">
> function changeColor(color)
> {
> myForm.elements[0].style.background=color
> }
> </script>
> </head>
> [...]
Hello Omicon,
this will change the bg-color "around" the checkbox.
I悲 like to know, if there is a way to change the color
"inside" the checkbox/radio button...
Thanks anyway...
...Frank
>omicron wrote:
>
>> Try this:
>>
>> <html>
>Hello Omicon,
>
>this will change the bg-color "around" the checkbox.
>I?d like to know, if there is a way to change the color
>"inside" the checkbox/radio button...
>
>Thanks anyway...
Hmm..yep...right. I see your point. Ok...sorry...I don't know of any
method to do that but that certainly doesn't mean there isn't some way
to achieve the desired effect. Keep at it!
that way you can put any kind of image (color & border)
and attach to it a onclick event to switch between '1'
or '0'