Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/11/2007, 09:51
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 2 meses
Puntos: 62
Re: Array de <Select>

a ver si te gusta esto:
Código HTML:
<html>
 <head>
  <script type="text/javascript">
   function Txek()
    {
	var form = document.getElementById("formu");    	
	var inputs = form.getElementsByTagName("select");	
	for (var i = 0; i < inputs.length; i++) 
	 {
	  alert(inputs[i].options[inputs[i].selectedIndex].value);
	 }
    }
  </script>
 </head>
 <body>
  <form id="formu">
  <select name="campo">
   <option value="1">1</value>
   <option value="2">2</value>
  </select>
 <select name="campo">
   <option value="3">3</value>
   <option value="4">4</value>
  </select>  
  <input type="button" value="Checkear" onclick="Txek()"/>
  </form>
 </body>
</html> 
lo acabo de hacer a ver si te sirve como punto de partida.

Con selectedIndex cogemos el valor que esta elegido.
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan