列表页网址都一样怎么办啊!!!!在线等!
http://www.xiamencredit.gov.cn:8086/xmcredit/webinfo/qyxxIndex.do?key=厦门&xtype=mc&hyfl=这是列表页,怎么才能把每页都采到,请各位指点一下
如果能把规则发出来那就更好了,谢一个先!!!
附分页所用js代码:
<SCRIPT>
<!--
var pageNum = 20; //常量每页条数
var lineNum = 1; //常量每行条数
var outlines= document.getElementsByName("TRS"); //取得页面概览记录对象
var rsCount = outlines.length;
var pageCount = 0; //计算总页数
if( rsCount % pageNum>0 ){
pageCount = (rsCount - (rsCount%pageNum))/pageNum +1;
}
else{
pageCount = rsCount/pageNum; //取得当前页对象并
}
var CP = document.getElementById("CP"); //文字输出区
var FileBody= document.getElementById("content");
//===========getCurrPage(_currentPage)规范跳转页码函数;_currentPage 跳转页码输入值===
function getCurrPage(_currentPage){
var cPage =1;
if( _currentPage<=0 || _currentPage=="")
cPage =1;
else if(_currentPage>pageCount)
cPage = pageCount;
else
cPage = _currentPage;
return cPage;
}
//===============goto()直接跳转函数=============================================
function goto(){
toPage(CP.value);
}
//===============toPage(_pageNo)跳转函数;_pageNo要跳转的页号====================
function toPage(_pageNo){
if( rsCount!=0 ){
var pageHtml = "<TABLE width='100%' border='0' CELLSPACING='0' CELLPADDING='4'>\r\n";
var cP = getCurrPage(_pageNo);
var startPos = cP*pageNum-pageNum;
var endPos = 0;
if(cP*pageNum>rsCount)
endPos=rsCount;
else
endPos = cP*pageNum;
for( var i=startPos; i<endPos; i++){
pageHtml +="<tr>";
for( var j=0; j<lineNum; j++ ){
if(i<endPos)
pageHtml += "<td width='"+(100/lineNum)+"%'>"+outlines.innerHTML + "</td>\r\n";
else
pageHtml +="<td width='"+(100/lineNum)+"%'> </td>";
i++;
}
i--;
pageHtml +="</tr>\r\n";
}
pageHtml +="</table>";
CP.value = cP;
FileBody.innerHTML= pageHtml;
showPageLineNum();
//alert(pageHtml);
}
return false;
}
//===========showPageLineNum()页面显示状态条函数==================
function showPageLineNum(){
var pL = "";
//if(CP.value!=1){
//pL+="<a href=# onclick=\"toPage(1)\" class=line03><img src='../images/head.gif' width='45' height='18' border='0'></a>";
//pL+="<a href=# onclick=\"toPage("+(CP.value-1)+")\" class=line03><img src='../images/prev.gif' width='45' height='18' border='0'></a>";
//}
//else{
//pL+="首页 ";
//pL+="上一页 ";
//}
if(CP.value<=pageCount){
pL+=" <a href=# onclick=\"toPage(1)\" class=line03><img src='../images/head.gif' width='45' height='18' border='0'></a>";
pL+="<a href=# onclick=\"toPage("+(CP.value-1)+")\" class=line03><img src='../images/prev.gif' width='45' height='18' border='0'></a>";
pL+="<a href=# onclick=\"toPage("+((CP.value)*1+1)+")\" class=line03><img src='../images/next.gif' width='45' height='18' border='0'></a>";
pL+="<a href=# onclick=\"toPage("+pageCount+")\" class=line03><img src='../images/tail.gif' width='45' height='18' border='0'></a>";
}
else{
//pL+="下一页 ";
//pL+="尾页 ";
}
pL += "<span><font size=2p> 页数"+CP.value+"/"+pageCount+" 共"+rsCount+"条记录</font></span>";
var showPageLine = document.getElementsByName("pl");
for( var pls=0; pls<showPageLine.length; pls++){
showPageLine.innerHTML = pL;
}
}
-->
</SCRIPT> <!-----------分页所用的js 结束---------------------->
[ 本帖最后由 xiaoping 于 2008-4-28 13:35 编辑 ] 联系935731516 这里看不出来的,这种一般是AJAX的,使用PSOT方式获取的数据 楼上正解.需要的话可以联系..
页:
[1]