<script type="text/javascript"> var loadConfig = { url_api:'url', typeid:0, page:2, pagesize:10, //和初始显示一致 loading : 0, } function loadMoreApply(){ $('.moregif').show().delay(); if(loadConfig.loading == 0){ var typeid = loadConfig.typeid; var page = loadConfig.page; var pagesize = loadConfig.pagesize; var url = loadConfig.url_api,data={ajax:'pullload',typeid:typeid,page:page,pagesize:pagesize}; function ajax(url, data) { $.ajax({url: url,data:data,async: false,type: 'GET',dataType: 'json',success: function(data) { addContent(data); $('.moregif').hide(); }}); } ajax(url,data); } } function