We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function ajax() { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = ActiveXObject("Microsoft.XMLHTTP"); } //判定执行状态 xmlhttp.onreadystatechange = function () { /* readyState 0: 请求未初始化 1: 服务器连接已建立 2: 请求已接收 3: 请求处理中 4: 请求已完成,且响应已就绪 status 200: 请求成功 404: 未找到 500: 服务器内部错误 */ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("myDiv").innerHTML = xmlhttp.responseText; //获得字符串形式的响应数据 } } xmlhttp.open("Get", "url", true); //设置头信息 xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //将信息发送到服务器 xmlhttp.send(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: