<div class="codetitle"> <span><a style="CURSOR: pointer" data="3721" class="copybut" id="copybut3721" onclick="doCopy('code3721')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code3721"> <br><!-- <BR>//ASP分页函数 <BR>function ShowListPage(page,Pcount,TopicNum,maxperpage,strLink,ListName){ <BR> var alertcolor = '#FF0000'; <BR> maxperpage=Math.floor(maxperpage); <BR> TopicNum=Math.floor(TopicNum); <BR> page=Math.floor(page); <BR> var n,p; <BR> if ((page-1)%10==0) { <BR> p=(page-1) /10 <BR> }else{ <BR> p=(((page-1)-(page-1)%10)/10) <BR> } <BR> if(TopicNum%maxperpage==0) { <BR> n=TopicNum/maxperpage; <BR> }else{ <BR> n=(TopicNum-TopicNum%maxperpage)/maxperpage+1; <BR> } <BR> document.write ('<table border="0" cellpadding="0" cellspacing="1" class="Tableborder5">'); <BR> document.write ('<form method=post action="?pcount='+Pcount+strLink+'">'); <BR> document.write ('<tr align="center">'); <BR> document.write ('<td class="tabletitle1" title="'+ListName+'"> '+ListName+' </td>'); <BR> document.write ('<td class="tabletitle1" title="总数"> '+TopicNum+' </td>'); <BR> document.write ('<td class="tabletitle1" title="每页"> '+maxperpage+' </td>'); <BR> document.write ('<td class="tabletitle1" title="页次"> '+page+'/'+Pcount+'页 </td>'); <BR> if (page==1){ <BR> document.write ('<td class="tablebody1"> <font face=webdings>9</font> </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="?page=1'+strLink+'" title="首页"><font face=webdings>9</font></a> </td>'); <BR> } <BR> if (p*10 > 0){ <BR> document.write ('<td class="tablebody1"> <a href="?page='+p*10+strLink+'" title="上十页"><font face=webdings>7</font></a> </td>'); <BR> } <BR> if (page < 2){ <BR> document.write ('<td class="tablebody1"> 首 页 </td>'); <BR> document.write ('<td class="tablebody1"> 上一页 </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="?page=1'+strLink+'" title="首页">首 页</a> </td>'); <BR> document.write ('<td class="tablebody1"> <a href="?page='+(page-1)+strLink+'" title="上一页">上一页</a> </td>'); <BR> } <BR> if (Pcount-page < 1){ <BR> document.write ('<td class="tablebody1"> 下一页 </td>'); <BR> document.write ('<td class="tablebody1"> 尾 页 </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="?page='+(page+1)+strLink+'" title="下一页">下一页</a> </td>'); <BR> document.write ('<td class="tablebody1"> <a href="?page='+Pcount+strLink+'" title="尾页">尾 页</a> </td>'); <BR> } <BR> for (var i=p*10+1;i<p*10+11;i++){ <BR> if (i==n) break; <BR> } <BR> if (i<n){ <BR> document.write ('<td class="tablebody1"> <a href="?page='+i+strLink+'" title="下十页"><font face=webdings>8</font></a> <td>'); <BR> } <BR> if (page==n){ <BR> document.write ('<td class="tablebody1"> <Font face=webdings>:</font> </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="?page='+n+strLink+'" title="尾页"><font face=webdings>:</font></a> </td>'); <BR> } <BR> document.write ('<td class="tablebody1"><input class="PageInput" type=text name="page" size=1 maxlength=10 value="'+page+'"></td>'); <BR> document.write ('<td class="tablebody1"><input type=submit value=Go name=submit class="PageInput"></td>'); <BR> document.write ('</tr>'); <BR> document.write ('</form></table>'); <BR>} <BR>//HTML分页函数 <BR>function ShowHtmlPage(page,Pcount,TopicNum,maxperpage,strLink,ExtName,ListName){ <BR> var alertcolor = '#FF0000'; <BR> maxperpage=Math.floor(maxperpage); <BR> TopicNum=Math.floor(TopicNum); <BR> page=Math.floor(page); <BR> var n,p; <BR> if ((page-1)%10==0) { <BR> p=(page-1) /10 <BR> }else{ <BR> p=(((page-1)-(page-1)%10)/10) <BR> } <BR> if(TopicNum%maxperpage==0) { <BR> n=TopicNum/maxperpage; <BR> }else{ <BR> n=(TopicNum-TopicNum%maxperpage)/maxperpage+1; <BR> } <BR> document.write ('<table border="0" cellpadding="0" cellspacing="1" class="Tableborder5">'); <BR> document.write ('<form method=post>'); <BR> document.write ('<tr align="center">'); <BR> document.write ('<td class="tabletitle1" title="'+ListName+'"> '+ListName+' </td>'); <BR> document.write ('<td class="tabletitle1" title="总数"> '+TopicNum+' </td>'); <BR> document.write ('<td class="tabletitle1" title="每页"> '+maxperpage+' </td>'); <BR> document.write ('<td class="tabletitle1" title="页次"> '+page+'/'+Pcount+'页 </td>'); <BR> if (page==1){ <BR> document.write ('<td class="tablebody1"> <font face=webdings>9</font> </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="index'+ExtName+'" title="首页"><font face=webdings>9</font></a> </td>'); <BR> } <BR> if (p*10 > 0){ <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+(p*10)+ExtName+'" title="上十页"><font face=webdings>7</font></a> </td>'); <BR> } <BR> if (page < 3){ <BR> document.write ('<td class="tablebody1"> 首 页 </td>'); <BR> document.write ('<td class="tablebody1"> <a href="index'+ExtName+'" title="上一页">上一页1</a> </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="index'+ExtName+'" title="首页">首 页1/a> </td>'); <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+(page-1)+ExtName+'" title="上一页">上一页</a> </td>'); <BR> } <BR> if (Pcount-page < 1){ <BR> document.write ('<td class="tablebody1"> 下一页1 </td>'); <BR> document.write ('<td class="tablebody1"> 尾 页 </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+(page+1)+ExtName+'" title="下一页">下一页</a> </td>'); <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+Pcount+ExtName+'" title="尾页">尾 页</a> </td>'); <BR> } <BR> for (var i=p*10+1;i<p*10+11;i++){ <BR> if (i==n) break; <BR> } <BR> if (i<n){ <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+i+ExtName+'" title="下十页"><font face=webdings>8</font></a> <td>'); <BR> } <BR> if (page==n){ <BR> document.write ('<td class="tablebody1"> <Font face=webdings>:</font> </td>'); <BR> }else{ <BR> document.write ('<td class="tablebody1"> <a href="'+strLink+n+ExtName+'" title="尾页"><font face=webdings>:</font></a> </td>'); <BR> } <BR> //document.write ('<td class="tabletitle1" title="转到"> GO </td>'); <BR> document.write ('<td class="tablebody1"><select class="PageInput" name="page" size="1" onchange="javascript:window.location=this.options[this.selectedIndex].value;">'); <BR> document.write ('<option value="index'+ExtName+'">第1页</option>'); <BR> for (var i=2;i<TopicNum;i++){ <BR> if (i==page){ <BR> document.write ('<option value="'+strLink+i+ExtName+'" selected>第'+i+'页</option>'); <BR> }else{ <BR> if (i==1){ <BR> document.write ('<option value="index'+ExtName+'">第1页</option>'); <BR> }else{ <BR> document.write ('<option value="'+strLink+i+ExtName+'">第'+i+'页</option>'); <BR> } <BR> } <BR> if (i==n) break; <BR> } <BR> document.write ('</select></td>'); <BR> document.write ('</tr>'); <BR> document.write ('</form></table>'); <BR>} <BR>//--><br> </div>