#301

New

lesson: getting all form data

Reported by Volkan Ozcelik on JavaScript: from Zero to Hero · 29/08/2018 18:32:29

Assigned to:
Volkan Ozcelik
Priority:
Normal
Status:
New
Category:
Lessons
Version:
None

You can easily grab all HTML form data like this:

var data = new FormData(document.querySelector(‘form’));

This gives you key/value pairs that are ready for an AJAX call. Handy for those doing plain JS and HTML apps.

Attachments

No attachment has been uploaded, yet.


Loading comments...