var xhr = new XMLHttpRequest(); xhr.open("POST", "http://url.com", false); // <-- 替换 http://url.com xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr.send("发送内容"); xhr.response;