thinkphp修改分页为post方式

1.thinkphp5

function aa_search(){
$('#pages ul li a').each(function(){
var href = $(this).attr('href');
var n = href.lastIndexOf('=')+1;
$(this).attr('onclick','func_search('+href.substr(n)+')');
$(this).removeAttr('href');
});
}

2.thinkphp3.2

function aa(){
$('#page_search div a').each(function(){
var href = $(this).attr('href');
var n = href.lastIndexOf('/')+1;
$(this).attr('onclick','func('+href.substr(n)+')');
$(this).removeAttr('href');
});
}
thinkphp3.2注意在后台代码中添加:$_GET['p']=I("post.p");

例子(tp5):

后台:

前台:

原文地址:https://www.cnblogs.com/walksnow/p/6717859.html