|
具体内容页见:http://ent.cqnews.net/ylove/201006/t20100604_4375815_8.htm
帮我看看这个分页应该怎样采集,感激不尽....- <div style=" padding-top:5px; padding-bottom:5px;">
- <SCRIPT LANGUAGE="JavaScript">
- <!--
- function createPageHTML(_nPageCount, _nCurrIndex, _sPageName, _sPageExt){
- if(_nPageCount == null || _nPageCount<=1){
- return;
- }
- var nCurrIndex = _nCurrIndex || 0;
- if(nCurrIndex == 0)
- {document.write("[1] ");}
- if(nCurrIndex == 1){
- document.write("<a class='page_class' href=""+_sPageName+"."+_sPageExt+""><img src='../../images/W020090708848649988387.gif' title='查看上一页' width='69' height='21'></a> ");
- document.write("<a href=""+_sPageName+"."+_sPageExt+"">[1]</a> ");
- }
- if(nCurrIndex > 1){
- document.write("<a class='page_class' href=""+_sPageName+"_" + (nCurrIndex - 1) + "."+_sPageExt+"">"+"<img src='../../images/W020090708848649988387.gif' title='查看上一页' width='69' height='21'>"+"</a> ");
- document.write("<a href=""+_sPageName+"."+_sPageExt+"">[1]</a> ");
- }
- for(var i=1; i<_nPageCount; i++){
- if(nCurrIndex == i)
- document.write("[" + (i+1) + "]" + " ");
- else if(i == 16)
- document.write("<br><a href=""+_sPageName+"_" + i + "."+_sPageExt+"">"+"["+(i+1)+"]"+"</a> ")
- else if(i == 32)
- document.write("<br><a href=""+_sPageName+"_" + i + "."+_sPageExt+"">"+"["+(i+1)+"]"+"</a> ")
- else
- document.write("<a href=""+_sPageName+"_" + i + "."+_sPageExt+"">"+"["+(i+1)+"]"+"</a> ");
- }
- if(nCurrIndex<_nPageCount-1){
- document.write("<a class='page_class2' href=""+_sPageName+"_" + (nCurrIndex+1) + "."+_sPageExt+"">"+"<img src='../../images/W020090708848649985441.gif' title='查看下一页' width='69' height='21'>"+"</a> ");
- }
- if(nCurrIndex==_nPageCount-1){
- document.write("<a class='page_class3' href=""+_sPageName+"."+_sPageExt+""><img src='../../images/W020090709364971077733.gif' title='返回首页' width='69' height='21'></a> ");
- }
- }
- //WCM置标
- createPageHTML(9, 8, "t20100604_4375815", "htm");
- //-->
- </SCRIPT>
复制代码 |
|