我正在使用IUI框架並嘗試從ajax調用中獲取結果。無法從ajax調用中獲取responseText XrayWrapper
在firebug中查看,調用返回一個「XrayWrapper [Object XMLHttpRequest {}」,但是我無法從對象中提取responseText。
當Firebug的擴展,這個responseText被列爲一個屬性,但它是在一個淺灰色文本使用get前綴:「得到responseText的」
var data = iui.ajax('login.php',{'userName':'sysadm','password':'sysadm'},'POST',null,xxxx(data))
console.log(data.responseText);
我已經嘗試了許多不同的方法,包括data.get .responseText,data.get('responseText')等等,但仍然無法抓住響應。
任何想法爲什麼?
其中是回調ajax是異步 –