Answers for "get response from form jquery"

0

get response from form jquery

$('#form').submit(function(){
    $.ajax({
      url: $('#form').attr('action'),
      type: 'POST',
      data : $('#form').serialize(),
      success: function(){
        console.log('form submitted.');
      }
    });
    return false;
});
Posted by: Guest on April-21-2021
0

get response from form jquery

$('#myForm')
    .ajaxForm({
        url : 'myscript.php', // or whatever
        dataType : 'json',
        success : function (response) {
            alert("The server says: " + response);
        }
    })
;
Posted by: Guest on April-21-2021

Code answers related to "get response from form jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language