Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.onreadystatechange = function () {
- if (xmlhttp.readyState == XMLHttpRequest.DONE) {
- console.log(xmlhttp.responseText);
- }
- };
- xmlhttp.open('POST', 'your_url.ext', true);
- xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
- query = 'yourquerydata=foo';
- xmlhttp.setRequestHeader("Content-length", query.length);
- xmlhttp.send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement