Тема: Javascript FormData
Привіт)
Не можу зрозуміти чому в коді в обєкт data є порожнім.
let form = document.forms.namedItem("fileinfo");
form.addEventListener('submit',(e)=>{
debugger
let data = new FormData(form);
console.log(data);
});
<form name="fileinfo">
<input type="text" name="username" placeholder="Your name:"><br>
<input type="text" name="Gender" placeholder="Gender:"><br>
<input type="date" name="date"><br>
<input type="text" name="adress" placeholder="Adress:"><br>
<input type="number" name="phone" placeholder="Phone:"><br>
<input type="email" name="email" placeholder="Email:"><br>
<button type="submit">Submit</button>
</form>