阅读811 返回首页    go 微软 go windows


纯js书写ajax

function getXhr(){

  var xhr=null;

  if(window.XMLHttpRequest){

    xhr=new XMLHttpRequest();

  }else{

    xhr=new ActiveXObject('Microsoft.XMLHttp');

  }

  return xhr;

}

var xhr=getXhr();

最后更新:2017-11-03 18:33:49

  上一篇:go  百度地图的js调用
  下一篇:go  javascript如何设置DIV背景色为随机色