﻿/*
使用方法
var AB = new AjaxBase();
AB.getXmlHttp();
*/
function AjaxBase(){};
AjaxBase.create=function(){};
AjaxBase.prototype.getXmlHttp = function()
{
	if(window.ActiveXObject)
	{
		try{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}catch(e){}
		try{
			return new ActiveXObject("Msxml2.XMLHTTP.6.0");
		}catch(e6){}
		try{
			return new ActiveXObject("Msxml2.XMLHTTP.4.0");
		}catch(e4){}
		try{
			return new ActiveXObject("Msxml2.XMLHTTP.3.0");
		}catch(e3){}
		return null;
	}
	else if(window.XMLHttpRequest)return new XMLHttpRequest();
	else return null;
}
//定义两个对象
var xmlHttpReq;
var AB = new AjaxBase();
//从网页中取对象
function $id(s){return document.getElementById(s);}
function $tag(s){return document.getElementsByTagName(s);}
function $name(s){return document.getElementsByName(s);}
