var url="www.baidu.com "; 接口URL地址
var t ="具体内容";
console.info(t);
s=JSON.parse(t);
var msg="";
var xhr1 = new XMLHttpRequest();
var xhr = new XMLHttpRequest();
xhr.open('POST', url, true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
//callback(xhr.responseText);
xhr1.open('POST', url, true);
xhr1.send(t);
}
};
xhr1.onreadystatechange = function () {
console.info(xhr1.readyState);
console.info(xhr1.status);
if (xhr1.readyState == 4 && xhr1.status == 200) {
msg=JSON.parse(xhr1.responseText);
alert(msg.payload.std_data.execution.description);
}
};