使用XMLHttpRequestvar xhr = new XMLHttpRequest();xhr.open("POST", '/server', true);//Send the proper header information along with the requestxhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xhr.onreadystatechange = function() { // Call a function when the state changes. if (this.readyState === XMLHttpRequest.DONE && this.status === 200) { // Request finished. Do processing here. }}xhr.send("foo=bar&lorem=ipsum");// xhr.send(new Int8Array()); // xhr.send(document);