我有以下处理 HTTP 请求的代码。但我越来越
错误:InvalidStateError:DOM 异常 11
错误。
if (window.XMLHttpRequest) {
req_settings = new XMLHttpRequest();
req_settings.onreadystatechange = processChange;
req_settings.open("GET", url, true);
req_settings.send();
} else if (window.ActiveXObject) {
req_settings = new ActiveXObject("Microsoft.XMLHTTP");
if (req_settings) {
req_settings.onreadystatechange = processChange;
req_settings.open("GET", url, true);
req_settings.send();
}
}
req_settings.onreadystatechange = processChange;
req_settings.send();
请帮忙。