Home  >  Article  >  Web Front-end  >  Simple example sharing of jquery form submission_jquery

Simple example sharing of jquery form submission_jquery

WBOY
WBOYOriginal
2016-05-16 16:57:231054browse

复制代码 代码如下:

$.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);
    }
  }
});
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn