09-解决方案
16.2.2 解决方案
(function($) {
$(document).ready(function() {
$('#loadingIndicator')
.bind('ajaxStart', function() {
$(this).show();
})
.bind('ajaxComplete', function() {
$(this).hide();
});
$.ajaxSetup({
cache: true,
dataType: 'json',
error: function(xhr, status, error) {
alert('An error occurred: ' + error);
},
timeout: 60000, // Timeout of 60 seconds
type: 'POST',
url: 'ajax-gateway.php'
}); //结束 $.ajaxSetup()
}); // 结束.read()
})(jQuery);