Browser console prints FormData information

Get the value of the form element 

 var formData = new FormData(document.getElementById("addForm")); 

 

Print formData information

for (var [a, b] of formData.entries()) {
                console.log(a, b);
            } 

 Print result:

 a corresponds to the name of the form element, b corresponds to the value of the form element

Guess you like

Origin blog.csdn.net/liangmengbk/article/details/108433290