HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏄‍♂️
[팀8] 어푸(Ah puh) - Surf
/
🔫
Trouble shooting
/
FormData 값들 확인하기

FormData 값들 확인하기

WHO
STATUS
solved
WHEN
Dec 10, 2021

FormData

The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. It is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data. The transmitted data is in the same format that the form's submit() method would use to send the data if the form's encoding type were set to multipart/form-data.
FormData는 객체가 아닌 XMLHttpRequest 전송을 위해 설계된 특수한 객체 형태이다. 따라서 일반 console.log() 로는 출력할 수 없다
 
전송 전에 FormData값을 확인하려면 entires(), keys(), values() 등을 활용하면 된다
const data=new FormData() data.append('k1','v1') data.append('k2','v2') for(const item of data.entries()){ console.log(item) }
 
👍 따봉