写的一个ajax的请求.
function Ajaxs()
{
   this._param="";
   this._URL="";
   this._xmlhttp=this.createAjax();
}Ajaxs.prototype={
   get:function (dataURL,datatype,rtn_type,Params,callbacks)
     {
        var par=this.makeParam(Params);
        var tstring=(datatype.toLowerCase() == "post")?"t="+ new Date().getTime():par;
        var pData = (datatype.toLowerCase() == "post")?par:null;
        t= this._xmlhttp
        this._xmlhttp.open(datatype?datatype:"GET",dataURL+"?"+tstring,true);
        this._xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        this._xmlhttp.onreadystatechange=function ()
           {
              if(t.readyState == 4)
                {
                  if(t.status == 200)
                    {
                       var res=(rtn_type.toLowerCase()!="xml")?t.responseText:t.responseXML;
                       if(callbacks) callbacks(res);
                    }
                  else
                   {
                     //alert("网络错误!Code:"+ t.status);
                     //return false;
                     ok();
                   }
                }
           }
        this._xmlhttp.send(pData);
        
     },
     
   createAjax:function ()
     {
         if(XMLHttpRequest)
           {
              try
               {xmlhttp = new XMLHttpRequest;}
              catch(e){}
           }
         else if(window.ActiveXObject)
           {
               try
                 {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
               catch(e){}
               try
                 {xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");}
               catch(e){}
           }
           
         if(!xmlhttp)
           {
              alert("不能创建XMLHTTP对象!");
              return false;
           }
           return xmlhttp;
     },
     
   makeParam:function (p)
      {
        var tempURL=""
        for(var o in p)
          {
            tempURL+= o + "=" + p[o] +"&"; 
          }
          tempURL+= "t="+ new Date().getTime();        
        return tempURL;
      }
}然后再调用时这样写:
var a = new Ajax;
a.get(....);为什么它提示this._xmlhttp=this.createAjax();这句有错?this.createAjax不是一个函数
而同样是这样的代码,在其它的方是可以用的.