<script type="text/javascript">
var xmlhttp;
function loadXMLDoc(url){
xmlhttp=null;
if (window.XMLHttpRequest){// code for all new browsers
xmlhttp=new XMLHttpRequest();
}else if (window.ActiveXObject){// IE5 and IE6
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=stateChange;
xmlhttp.open("GET",url,true);//true表示继续执行后面的代码send(),而不必等待服务器的响应
xmlhttp.send(null);
}
function stateChange(){
if (xmlhttp.readyState==4){// 4 = "loaded"
if (xmlhttp.status==200){// 200 = OK
// 这里添加需要怎么处理的代码!
}else{
alert("出错啦!");
}
}
}
</script>
ajax基础框架
原创gundumw100 ©著作权
文章标签 xml javascript 服务器 文章分类 JavaScript 前端开发
-
Ajax之二 Ajax基础
[学习目标] 理解并掌握XMLHttpRequest对象的相关属性和方法的使用 理解并掌握如何利用XMLHttpRequest对象读取xml格式文档 【本章简介】 Ajax是一组技术的集合,Asp.Net AJAX就是建立在这组技术的基础之上的。虽然Asp.Net AJAX尽量隐藏了Ajax的技术细节,但是要想明白Asp.Net AJAX
ajax XMLHTTP Request.QueryString Request.Form onreadystatechange -
关于ajax框架
http://demo.dwzjs.com/#page3
ajax框架 jquery .net html -
10.31 Ajax基础
在网页中利用 XMLHttpRequest 对象和服务器进行数据交互的方式,就是 Ajax。
ajax 前端 javascript 服务器 客户端 -
AJAX基础(一)
(一) XMLHttpRequest对象的几个方法和属性open() 建立到服务器的新请求se出正在处理
ajax xmlhttprequest 服务器 xml javascript