插件81:Ajax请求

function PIPHP_JS_AjaxRequest()
{
   try
   {
      var request = new XMLHttpRequest()
   }
   catch(e1)
   {
      try
      {
         request = new ActiveXObject("Msxml2.XMLHTTP")
      }
      catch(e2)
      {
         try
         {
            request = new ActiveXObject("Microsoft.XMLHTTP")
         }
         catch(e3)
         {
            request = false
         }
      }
   }
   return request
}

插件说明:

本插件不需要任何参数,若操作成功,则返回一个XMLHttpRequest对象,否则返回false

你可能感兴趣的:(Ajax,function,XMLhttpREquest)