HTML代码:
<div> <div id = "kppcl"> <div> <div> <div> <a href = '{#url_reset( "activity/details"、 "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> href = '{#url_reset( "activity/detailing"、 "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <table cellspacing = "0" cellpadding = "0"> <tr </th> <td> {#$ item.start_date#} - {#$ item.end_date#} </td> </tr> <tr> <th>地点:</th> <td> {#$ $ ite.area_name#} </td> </tr> </table> href = '{#url_reset( "activity/detailing"、 "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> </a> </div> <div> <a href = '{#url_reset( "activity/detailing"、 "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <table cellspacing = "0" cellpadding = "0"> <tr </th> <td> {#$ item.start_date#} - {#$ item.end_date#} </td> </tr> <tr> <th>地点:</th> <td> {#$ $ ite.area_name#} </td> </tr> </table> href = '{#url_reset( "activity/detailing"、 "id _ {#$ item.id#}")#}'> <img src = "{#$ item.logo#}"/> </a> </div> <div> <a href = '{#url_reset( "activity/detailing"、 "id _ {#$ item.id#}")#}'> {#$ item.title#} </a> </div> <div> <table cellspacing = "0" cellpadding = "0"> <tr </th> <td> {#$ item.start_date#} - {#$ item.end_date#} </td> </tr> <tr> <th>地点:</th> <td> {#$ ite.area_name style = "display:none"> <div> <b>上一页</b> <b> 1 </b> <a href = "?p = 2"> 2 </a> <a href = "?p = 2" rel = "2">JS代码
<script src = "/js/blocksit.min.js"> </script> <スクリプト言語= "javascript" type = "text/javascript"> $(window).load(function(){$( '#KPPCL')。 var current_p = 0; //滚动$(window).scroll(function(){//当滚动到最底部以上100像素时、加载新内容if($(document).height() - $(this).scrolltop() - $(this).height()<100){ajax_load_data();}}); function ajax_load_data(){var next_p = $( '#page')。find( '。nextprev')。attr( 'rel'); if(next_p && next_p!= current_p){console.log( 'nextpage ='+next_p); current_p = next_p; $ .ajax({url: '{#url_reset( "request/front/ajax"、 "" "、" php ")#}'、data:{'act': 'ajax_forum'、 'p':next_p}、datatype: 'json'、type: 'post'、beforesend: show_loading_body(); function(data){if(data.status!= undefined && datas == 'ok'){$( '#kppcl')。 $( '#page')。html(data.pages_str); }} </script>