gpt4 book ai didi

javascript - Ajax 未捕获类型错误 : Illegal invocation

转载 作者:行者123 更新时间:2023-11-29 23:20:18 24 4
gpt4 key购买 nike

enter image description here我看过每个教程,但没有任何改变

$(document).ready(function(e){
$('#formImage').on('submit', function(e){
e.preventDefault();
$.ajax({
url: '../php/insertImage.php',
type: 'post',
data: new FormData(this),
prosessData:false,
contentType: false,
success:function(e){
console.log(e);
alert(e);
}
});
});
});

这是我的表格

<form action="" method="post" enctype="multipart/form-data" class="form-horizontal" id="formImage">
<div class="form-group col-md-12 row" style="margin-top: 50px;">

<label class="col-form-label">Input picture here</label>
<div class="col-md-6">
<input type="file" name="inputfile" id="my-pic" class="form-control">
</div>
<div>
<button type="submit" class="btn btn-primary" id="upload-mypic">Upload</button>
</div>
</div>
</form>

我不知道了..请帮忙谢谢

最佳答案

你注意到processData的拼写了吗?您已经编写了 prosessData。

关于javascript - Ajax 未捕获类型错误 : Illegal invocation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50998578/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com