(1)AJAX

 Asynchronous JavaScript And XML(异步 JavaScript 及 XML)

 

(2)创建 XMLHttpRequest 对象

不同的浏览器使用不同的方法来创建 XMLHttpRequest 对象。

Internet Explorer 使用 ActiveXObject。

其他浏览器使用名为 XMLHttpRequest 的 JavaScript 内建对象。

function GetXmlHttpObject()
{
var xmlHttp=null;

try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

 

相关文章:

  • 2022-12-23
  • 2018-09-29
  • 2021-10-01
  • 2021-09-12
  • 2022-12-23
  • 2022-01-11
  • 2021-07-31
  • 2021-09-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案