'; html+=''; if(index==10||total==count){ html+=''; html+='
'; index=0; } }); $('#newsList').empty(); $('#newsList').append(html); if(pageNow==0){ $("#Pagination").pagination(num_entries, { num_edge_entries: 1, //边缘页数 num_display_entries: 4, //主体页数 callback: pageselectCallback, items_per_page: 1, //每页显示1项 prev_text: "<<", next_text: ">>" }); } } } else { // 操作失败 } } }); } function initList1() { var $html = ''; var data={ 'columnId': columnId, 'page':pageNow+1, 'size':pageSize }; $.ajax({ url : 'http://www.cww.net.cn/web/news/articleinfo/selctArticleListBycolumnId.json', type : 'get', data : $.param(data), dataType : 'json', success : function(data) { // 操作成功 if (data['statusCode'] == '200') { var html=""; var data=data['data']; total=data['total']; num_entries=parseInt(total/pageSize); if(total%pageSize>0) num_entries++; var rows=data['rows']; if(total<=0){ html='
'; $('#newsList').empty(); $('#newsList').append(html); }else{ var index=0; var count=0; $.each(rows, function(idx, obj) { index++; count++; if(index==1){ html+=''; html+='
'; index=0; } }); $('#newsList').empty(); $('#newsList').append(html); if(pageNow==0){ $("#Pagination").pagination(num_entries, { num_edge_entries: 1, //边缘页数 num_display_entries: 4, //主体页数 callback: pageselectCallback, items_per_page: 1, //每页显示1项 prev_text: "<<", next_text: ">>" }); } } } else { // 操作失败 } } }); } var format = function(time, format){ var t = new Date(time); var tf = function(i){return (i < 10 ? '0' : '') + i}; return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){ switch(a){ case 'yyyy': return tf(t.getFullYear()); break; case 'MM': return tf(t.getMonth() + 1); break; case 'mm': return tf(t.getMinutes()); break; case 'dd': return tf(t.getDate()); break; case 'HH': return tf(t.getHours()); break; case 'ss': return tf(t.getSeconds()); break; } }) }
...
热点文章
    暂无内容