//共用这2个全局的ajax事件
$(
"#loading"
).ajaxStart(
function
(){
this
).show();
});
).ajaxStop(
).hide();
<div id=
"loading"
>加载中...</div>