Thu thập dữ liệu form dạng key-value pairs. new FormData(formElement) tự động lấy tất cả fields.
- Hỗ trợ file upload.
- Dùng với
fetch()để submit form bằng JavaScript. - Methods:
append(),get(),entries().
Collects form data as key-value pairs. new FormData(formElement) automatically captures all fields.
- Supports file uploads.
- Used with
fetch()to submit forms via JavaScript. - Methods:
append(),get(),entries().