8.7w+
社区成员
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function()
{
if( xmlHttp.readyState == 4 && xmlHttp.status == 200 )
{
alert(xmlHttp.responseText);
}
}
xmlHttp.open("POST", "http://xxxxxx", true );
xmlHttp.setRequestHeader("Content-Type","application/json")
xmlHttp.send(JSON.stringify({a:1,b:2}) );