创建xmlhttp对象
var xmlhttp;
try{
xmlhttp=new ActiveXObject('Msxm12.XMLHTTP');
}catch(e){
try{
xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
}catch(e){
try{
xmlhttp=new XMLHttpRequest();好像在editplus中用的是这个
}catch(e){}
}
定义xmlhttp事件处理
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)//表示请求已经准备好了
{
if(xmlhttp.staus==200){}//表示数据已经读回来了
}
}
转载于:https://www.cnblogs.com/lishenglyx/archive/2008/08/21/1273078.html