通过jquery ajax()和serialize()提交html表单

通过jquery ajax()和serialize()提交html表单,第1张

通过jquery ajax()和serialize()提交html表单

使用此方法-出现一些语法错误,必须提交事件

 $(function(){        $("#form1").submit(function(event){ event.preventDefault(); $.ajax({         url:'submit.php',         type:'GET',         data:$(this).serialize(),         success:function(result){  $("#response").text(result);         } });        });    });


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4974498.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-13
下一篇 2022-11-13

发表评论

登录后才能评论

评论列表(0条)

保存