87,955
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
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}) );