Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/12/2014, 19:23
moginn
(Desactivado)
 
Fecha de Ingreso: enero-2013
Mensajes: 289
Antigüedad: 11 años, 9 meses
Puntos: 10
Respuesta: validar inputs rango 1 a 3 sin repetecion

Código HTML:
<script>
$( "form" ).submit(function() {
     var number1 = $('#number1').val();
     var number2 = $('#number2').val();
     var number3 = $('#number3').val();

      if((number1 == "1" && number2 == "2" && number3 == "3") ||
(number1 == "3" && number2 == "2" && number3 == "1") ||
(number1 == "2" && number2 == "1" && number3 == "3") ||
(number1 == "2" && number2 == "3" && number3 == "1") ||
(number1 == "1" && number2 == "3" && number3 == "2") ||
(number1 == "3" && number2 == "1" && number3 == "2"))
          return true;
    else
          return false;
});
</script>