mardi 24 février 2015

Form with two inputs not submitting?

Could someone please explain why this code isn't working:



$('form').on('submit', function (e) {
e.preventDefault();

var first = $('.first').val();
var next = $(".next").val();
alert(first + " " + next);
});


http://ift.tt/1AqvMct


It seems to work fine when I remove one of the two inputs but having them both there messes it up.


Aucun commentaire:

Enregistrer un commentaire