Ver Mensaje Individual
  #8 (permalink)  
Antiguo 17/12/2007, 14:04
Avatar de agressor
agressor
 
Fecha de Ingreso: noviembre-2007
Ubicación: Knocking the Death Door..
Mensajes: 368
Antigüedad: 16 años, 5 meses
Puntos: 3
Re: Llamada a función javascript en PHP

Y por si no te quedo claro aun entonces te mando este con todas las propiedades de los select.. espero te sirvan..

<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&oacute;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>