2
在下面的代碼中,是否可以從else塊調用錯誤函數?
$.getJSON('something.php', function(data) {
if (data.error === undefined) {
} else {
// How can I call the error function below?
}
}).error(function() {
// This is the error function the be called.
});
哈哈你是第二快於我。我正在寫同樣的東西。 – Miro 2012-03-23 17:36:31