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=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function ActionSelect(val){
var opt=document.getElementsByTagName("option");
for (var i=0; i<opt.length; i++){
if(opt[i].value == val.value){
alert("option selezionata "+val.value)
}
}
}
onload=function(){
document.getElementById('sel1').onchange=function(){ActionSelect(this.options[this.selectedIndex]);}
}
</script>
</head>
<body>
<div id="main">
<form action="" name="nomeform" method="get">
<select name="sel1" id="sel1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</form>
</div>
</body>
</html>
Esempio testato e funzionante con firefox 4 e safari 5 S.O. mac 10.6