【发布时间】:2018-08-27 22:56:29
【问题描述】:
我正在尝试使用 AJAX 发送 HTML 表单数据,但我也在尝试使用相同的 AJAX POST 调用发送其他数据。
这可能吗?
$('#HTMLConForm').on('submit', function (e)
{
e.preventDefault();
$.ajax({
url: "***NewUserURL.com***",
type: "POST",
data:{
'otherinfo': otherinfo,
'form_data': new FormData(this),
},
processData: false,
contentType: false,
success: function (data)
{
alert('You Have Registered')
/*window.location = "index.html"; */
},
error: function (xhr, desc, err)
{
}
});
});
任何帮助都将不胜感激!
【问题讨论】:
标签: javascript html ajax xml