B
Bart Van der Donck
Hello,
I am using IE5 and have a select-box with options that have different
colors. Is there a way to read out the style attribute of the
selectedIndex (here: color)?
See simple demo script here under.
Thanks in advance,
Bart
<html>
<head>
<script>
function goz()
{
a="[MYCOLOR]"
// How can this alert box show the current color ?
alert('The selected option has color:'+a)
}
</script>
</head>
<body>
<form>
<select size=2 onDblClick="goz()" name=r>
<option value="1" style="color: red">fff
<option value="2" style="color: black">dfd
</select>
</form>
</body>
</html>
I am using IE5 and have a select-box with options that have different
colors. Is there a way to read out the style attribute of the
selectedIndex (here: color)?
See simple demo script here under.
Thanks in advance,
Bart
<html>
<head>
<script>
function goz()
{
a="[MYCOLOR]"
// How can this alert box show the current color ?
alert('The selected option has color:'+a)
}
</script>
</head>
<body>
<form>
<select size=2 onDblClick="goz()" name=r>
<option value="1" style="color: red">fff
<option value="2" style="color: black">dfd
</select>
</form>
</body>
</html>