通过ajax提交多种表格

通过ajax提交多种表格,第1张

通过ajax提交多种表格

不,没有

method
属性,其
type

$.ajax({    'url': 'handler/test_handler.php',    'type': 'POST', // type not method    'data': {data: JSON.stringify(results)},    'dataType': 'html',    'success': function (data) {        console.log(data);    }});

method
<form>
标记中使用的属性。

样本输出

旁注:我认为

serializeArray()
更合适:

results.push($(this).serializeArray());

另一个例子



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

原文地址: https://outofmemory.cn/zaji/4955204.html

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

发表评论

登录后才能评论

评论列表(0条)

保存