Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/01/2011, 06:00
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: Rescatar dos id con funcion de jquery

Código HTML:
Ver original
  1.     <head>
  2.         <title>Ejemplo</title>
  3.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  4.         <script>
  5.  
  6.         $(function(){
  7.             $("#Select2").change(function(){
  8.                 Obra();
  9.             });
  10.  
  11.             function Obra(){
  12.                 id_obra = $('#Select1').val();
  13.                 id_cliente = $('#Select2').val();
  14.                 alert(id_obra + " " + id_cliente);
  15.             }
  16.         });
  17.         </script>
  18.         <style>
  19.  
  20.  
  21.         </style>
  22.     </head>
  23.     <body>
  24.  
  25.         <select id="Select1">
  26.             <option>Obra1</option>
  27.             <option>Obra2</option>
  28.         </select>
  29.         <select id="Select2">
  30.             <option>Cli1</option>
  31.             <option>Cli2</option>
  32.         </select>
  33.  
  34.     </body>
  35. </html>