Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/04/2012, 09:08
Avatar de Dafonz
Dafonz
 
Fecha de Ingreso: octubre-2009
Mensajes: 127
Antigüedad: 14 años, 6 meses
Puntos: 36
Respuesta: Sumar y multiplicar en jquery con .val()

Pues a mi si me funciona, si pudieras poner mas codigo..
Código Javascript:
Ver original
  1. $('document').ready(function(){
  2.             $('#sumar').click(function(){
  3.                 alert(parseFloat($('#si').val()) + parseFloat($('#no').val()));
  4.             });
  5.         });

Código HTML:
Ver original
  1. <input type="text" id="si" />
  2. <input type="text" id="no" />
  3. <input type="button" id="sumar" value="Sumar">