我有一个联系表格。发送时,我使用 AJAX 发送邮件并回复用户。要获取我使用的表单数据var form = $('#form').serialize();
$('#form').click(function(e){
$('#form_msg').hide().html('');
var form = $('#form').serialize();
form += '&lingua='+lingua;
$.ajax({
type: 'POST',
url: 'contatti.php',
cache: false,
data: form,
success: function(result){
$('#form').html(result);
},
error: function(data){
$('#form_msg').html(data.responseText).show();
}
});
e.preventDefault();
});
表格有 2input[type=text]
和 a textarea
。
我注意到当我发布类似
Content-Type%3A+text%2Fhtml
在textarea
服务器上返回一个403 error
并在几次发送后崩溃。
为什么?我该如何解决这个问题?