使用原生js写ajax实例(推荐) 实例如下://使用原生js封装ajax//兼容xhr对象functioncreateXHR(){if(typeofXMLHttpRequest!="undefined"){// 原生js写ajax