Jquery submission form simple example to share

  • 2020-03-30 02:10:12
  • OfStack


$.ajax({
  url : 'deliveryWarrant/update.do',
  data : $('#myform').serialize(),
  type : "POST",
  success : function(data) {
    var res = eval('(' + data + ')');
    if (res && res.success == true) { 
      alert(res.message);
    location.href="/form.php?godownWarrant.code="+$("#myform input[name=godownWarrant\.code]").val();
    } else {
      alert(res.message);
    }
  }
});


Related articles: