formData格式上传数据时查看formdata的值

const formData = new FormData();
formData.append(“crowdName”, this.state.inputVlaue);

//第一种
for (var value of formData.values()) {
console.log(value);
}
//第二种
for (var [a, b] of formData.entries()) {
console.log(a, b);
}

你可能感兴趣的:(项目)