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);
});
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