我有一個代碼:什麼是AjaxAdapter和什麼是query()?
req = new AjaxAdapter;
req.dataType = 'json';
return req.query('GET', url, request, function(responseServer, status, xhr) {
var json;
json = responseServer.data;
return response(json);
}, function(jqXHR, textStatus, errorThrown) {
var exception;
exception = jQuery.parseJSON(jqXHR.responseText);
return showError(exception);
});
而且我不明白。那麼query()
函數是什麼?我無法在jQuery文檔中找到它。見我的例子中,這個函數有5個參數:
- 得到
- 網址
- 要求
- 函數返回數據(響應)
- 功能是通話時的錯誤
請求是什麼?我在哪裏可以找到query()
函數的文檔?
這不是jQuery。 – Sampson
我認爲問題是:什麼是AjaxAdapter?你能找到AjaxAdapter的定義嗎? –
https://groups.google.com/forum/?fromgroups=#!topic/wireit/psZEjY3L3Go – jbabey