87,907
社区成员
发帖
与我相关
我的任务
分享
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}) );