console form elememts as json object

Solutions on MaxInterview for console form elememts as json object by the best coders in the world

showing results for - "console form elememts as json object"
Henry
09 Apr 2017
1function handleSubmit(event) {
2    event.preventDefault();
3
4    const data = new FormData(event.target);
5
6+   const value = Object.fromEntries(data.entries());
7
8    console.log({ value });
9  }
10
11  const form = document.querySelector('form');
12  form.addEventListener('submit', handleSubmit);
similar questions
queries leading to this page
console form elememts as json object