Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

FormData upload file

const form = document.getElementById('form');
const formData = new FormData(form);

const output = document.getElementById('output');

for (const [key, value] of formData) {
  output.textContent += `${key}: ${value}
`;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #FormData #upload #file
ADD COMMENT
Topic
Name
4+8 =