标签:lang strong script request sof active mic lan 接收
Ajax四个步骤
1. 创建Ajax对象
2. 连接到服务器
3. 发送请求
4. 接收返回值
Var oAjax = new XMLHttpRequest();
//IE6.0版本所使用的Ajax
Var oAjax = new ActiveXObject(“Micosoft.XMLHTTP”);
//使用没有定义的变量----报错
//使用没有定义的属性----Underfine
<script>
Alert(a);//会提示错误。
Alert(window.a);//会提示underfine
</script>
那么就可以那么写
<script>
Button.onclick = function()
{
If(window. XMLHttpRequest()){
Var oAjax = new XMLHttpRequest();
}else{
Var oAjax = new ActiveXObject(“Micosoft.XMLHTTP”);
}
}
</script>
标签:lang strong script request sof active mic lan 接收
原文地址:http://www.cnblogs.com/xishaonian/p/7073508.html