1、语法:现在的浏览器均支持XMLHttpRequest对象
variable=new XMLHttpRequest();
旧版本浏览器使用的是:variable=new ActiveXObject("Microsoft.XMLHTTP");
var xmlhttp;
if(window.XMLHttpRequest
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}