HTML code
<table class= "gridtable" align= "center" valign= "center" id= "Fenye" >
<tr>
<th width=600> Single Head </th>
<th width=600> Single Head </th>
</tr>
@foreach ($data as $_data)
<TR class= "test" style= "Display:none;" >
<TD width=600> First Article </td>
<TD width=600> First Data </td>
</tr>
@endforeach
</table>
JS section, you can customize the modification
<script>
var obj,j;
var page=0;
var nowpage=0;//current Page
var listnum=20;//display <ul> per page
var pageslen;//total Pages
var pagenum=7;//page link Number of links (5)
Onload=function () {
Obj=document.getelementbyid ("Fenye"). Getelementsbyclassname ("test");
J=obj.length
Pageslen=math.ceil (J/listnum);
Uppage (0)
}
function Uppage (p) {
Nowpage=p
Content transformation
for (Var i=0;i<j;i++) {
Obj[i].style.display= "None"
}
For (Var i=p*listnum;i< (p+1) *listnum;i++) {
if (Obj[i]) obj[i].style.display= "Table-row"
}
Paging Link transformation
strs= ' <a href= "# # #" onclick= "uppage (0)" > Home </a> "
var pagenum_2=pagenum%2==0? Math.ceil (PAGENUM/2) +1:math.ceil (PAGENUM/2)
var pagenum_3=pagenum%2==0? Math.ceil (PAGENUM/2): Math.ceil (PAGENUM/2) +1
var strc= "", startpage,endpage;
if (Pagenum>=pageslen) {startpage=0;endpage=pageslen-1}
else if (nowpage<pagenum_2) {startpage=0;endpage=pageslen-1>pagenum? pagenum:pageslen-1}//Home
else {Startpage=nowpage+pagenum_3>=pageslen? Pageslen-pagenum-1: Nowpage-pagenum_2+1;var T=startpage+pagenum;endpage=t>pageslen? Pageslen-1:t}
for (Var i=startpage;i<=endpage;i++) {
if (i==nowpage) strc+= ' <a href= ' # # # "style=" color:red;font-weight:700 "onclick=" uppage (' +i+ ') "> ' + (i+1) + ' < /a> '
else strc+= ' <a href= ' # # # ' onclick= ' uppage (' +i+ ') ' > ' + (i+1) + ' </a> '
}
Stre= ' <a href= ' # # # onclick= ' Uppage (' + (PagesLen-1) + ') ' > Last </a> '
stre2=nowpage+1+ "/" +pageslen+ "page" + "Total" +j+ "bar"
StrE3 = ", Success" +{{$success}}+ "bar, failed <span style= ' color:red;font-weight:700; ' > "+{{$fail}}+" </span> Bar "
document.getElementById ("Changpage"). Innerhtml=strs+strc+stre+stre2+stre3
}
</script>
JS Paging Code