Forse vuoi fare tipo questo esempio?
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function Test() {
test1.style.backgroundColor=test1.options[test1.selectedIndex].style.backgroundColor;
test1.options[0].style.backgroundColor="white";
test1.options[1].style.backgroundColor="red";
test1.options[2].style.backgroundColor="green";
test1.options[3].style.backgroundColor="gray";
}
</script>
</head>
<body>
<p>
<select id="test1" onclick="Test()" >
<option value="0" style="background-color:white;" >ZERO</option>
<option value="1" style="background-color:red;"><span >UNO</span></option>
<option value="2" style="background-color:green;" value="1" ><span >DUE</span></option>
<option value="3" style="background-color:gray;"><span >TRE</span></option>
</select>
</p>
</body>
</html>
Se pero' quando apri lil form vuoi che sia selezionato il colore relativo del campo selected che sarebbe dinamico...io utilizzo ASP e lo faccio inline...min javascripta se sai quale è il valore di option selezionato prima di visualizzare la select lo puoi cambiare onload...
vedi se puo esserti utile
ciao