Librerías
De ActionApps Documentacion
Captura de propiedades de combo select
Tomado de Desarrolloweb [1]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Ejemplo select</title>
<script>
function dimePropiedades(){
var texto
texto = "El numero de opciones del select: " + document.formul.miSelect.length
var indice = document.formul.miSelect.selectedIndex
texto += "\nIndice de la opcion escogida: " + indice
var valor = document.formul.miSelect.options[indice].value
texto += "\nValor de la opcion escogida: " + valor
var textoEscogido = document.formul.miSelect.options[indice].text
texto += "\nTexto de la opcion escogida: " + textoEscogido
alert(texto)
}
</script>
</head>
<body>
<form name="formul">
Valoración sobre este web:
<select name="miSelect">
<option value="10">Muy bien
<option value="5" selected>Regular
<option value="0">Muy mal
</select>
<br>
<br>
<input type=button value="Dime propiedades" onclick="dimePropiedades()">
</form>
</body>
</html>
Select y go
Tomado de HotSource [2]
<html>
<head>
<title>Select and Go</title>
<script language="JavaScript">
<!--
function openDir(form) {
window.location =(form.dir.options[form.dir.selected Index].value);
}
// -->
</script>
</head>
<body>
<form name="myform">
<div align="center"><p><select name="dir" size="1">
<option value="">Choose a Site</option>
<option value="http://www.yahoo.com/">Yahoo!
<option value="http://www.excite.com/">Excite
</select><input type="button" name="button" value="Go!" onclick="openDir(this.form);"></p>
</div>
</form>