只不过文章的分页是通过substr()函数截取该页应当显示的文字内容
$content=substr($c1,strlen($c),strlen($c1)-strlen($c))
$c代表从文字开头到上一页文字末尾的内容
$c1代表从文字开头到当前页文字末尾的内容
当前页文字内容$content为$c1的内容减去$c的内容
这样做有一些缺陷,你做的时候会体会到的……
最常见的分页的代码是 :ASP PHP JSP如果你的静态页面要分页 有一个 方法---JS
HTML上的分页JS代码
<form onsubmit="window.location=this.aaa.options[this.aaa.selectedIndex].valuereturn false">
<select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value">
<SCRIPT type=text/javascript>
for(var pN=1pN<184pN++)
document.write("<option value='Page_"+pN+".html'>第"+pN+"页</option>")
</SCRIPT>
</select></td></form>
加一个page=8的参数?
然后在for那里再用条件判断??
<form onsubmit="window.location=this.ep8.options[this.ep8.selectedIndex].valuereturn false">
<select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value">
<script type="text/javascript">
p=8
for(var i=1i<9i++)
if (i==p){
document.write("<option value='Page_"+p+".html' selected>第"+p+"页</option>")
}
else {
document.write("<option value='Page_"+i+".html'>第"+i+"页</option>")
}
</script>
</select></form>