var innerpage,pagehtml,thecontent,a_thecontent; var currentpage=0; var pagecount=0; var p=6; //表示开始时显示的页码总数 var m=3; //超过p页后左右两边显示页码数 var lastpage; function build_innerpage() { pagehtml=""; if(currentpage
pagecount)
{
lastpage=pagecount;
}
for(i=1;i<=lastpage;i++)
{
if(currentpage==i)
{
pagehtml+=" "+i+"";
}
else
{
pagehtml+=" "+i+"";
}
}
}
else
{
lastpage=currentpage+m;
if(lastpage>pagecount)
{
lastpage=pagecount;
}
for(i=currentpage-m;i<=lastpage;i++)
{
if(currentpage==i)
{
pagehtml+=" "+i+"";
}
else
{
pagehtml+=" "+i+"";
}
}
}
if(currentpage>1)
{
pagehtml=" 首页 上一页"+pagehtml;
}
if(currentpage>=1 && currentpage
]*page-break-after[^>]*>/i);
// if (object.hasownproperty.call(window, "activexobject") && !window.activexobject)
//{
// a_thecontent=thecontent.split(/
/i);
//}
//else
//{
//a_thecontent=thecontent.split(/
/i);
//}
pagecount=a_thecontent.length;
if(pagecount>1)
{
document.write('');
innerpage=document.getelementbyid("contentinnerpage");
page(1);
}
}