var form = document.querySelector('form');
var data = new FormData(form);
var req = new XMLHttpRequest();
req.send(data);
Though it seems to be working only for POST requests.
More Related Contents:
- How do I use jQuery’s form.serialize but exclude empty fields
- Convert form data to JavaScript object with jQuery
- How can I display a JavaScript object?
- Submit form without page reloading
- Converting between strings and ArrayBuffers
- Submit two forms with one button
- Prevent double submission of forms in jQuery
- JavaScript Form Submit – Confirm or Cancel Submission Dialog Box
- How do I capture response of form.submit
- How to submit an HTML form without redirection
- Serialize object to query string in JavaScript/jQuery [duplicate]
- How to get number of rows in using JavaScript?
- Form Submit Execute JavaScript Best Practice? [closed]
- Composing multipart/form-data with a different Content-Type on each parts with Javascript (or Angular)
- Best way to serialize/unserialize objects in JavaScript?
- Get element by part of Name or ID
- onsubmit multiple javascript functions
- Form ‘onsubmit’ not getting called
- How do I add validation to the form in my React component?
- Angularjs how to upload multipart form data and a file?
- a way to check validity of HTML5 forms?
- submit event does not fire if submit initiated programmatically
- How best to make a link submit a form
- accessing a form that is in an iframe
- Get HTTP Body of Form in JavaScript
- Is there an “after submit” jQuery option?
- Is there a better jQuery solution to this.form.submit();?
- jQuery asynchronous function call, no AJAX request
- Form Validation With Bootstrap (jQuery)
- Form submit button will not submit when name of button is “submit” [duplicate]