摘要:
一,原生JS实现ajax:1234567891011functionAjaxGet(){varxhrObj;if(window.ActiveXObject)//ie5,6是以ActiveX方式声明的。{xhrObj =newActiveXObject("Microsoft.XMLHTTP");}elseif(window.XMLHttpRequest){xhrObj =newXMLHttpRequest();}//下面这段代码需要注意,有可能会报Origin null is not allowed by Access-Control-Allow-Origin. 这个错误,原 阅读全文