这种文章列表页的url怎么采集?
urls='../../art/2015/9/21/art_62_60395.html';
headers='省政府决定保留省工商局行政许可项目8项(豫政56号)';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_60394.html';
headers='企业名称预先核准、外商投资企业预先登记注册';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_60392.html';
headers='企业、企业集团核准登记、变更、注销';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_60391.html';
headers='外商投资企业、外商投资企业集团及外国企业常驻代表机构注册登记核准、变更、注销';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_60386.html';
headers='外国(地区)企业在豫从事生产经营活动核准';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_6111.html';
headers='广告经营资格许可';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_6114.html';
headers='固定形式印刷品广告登记';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_6113.html';
headers='烟草广告审批';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
urls='../../art/2015/9/21/art_62_6112.html';
headers='外商投资广告企业项目审批及外商投资广告企业设立分支机构审批';
year='2015';
month='09';
day='21';
imgstrs=' ';
i++;
var formatstr="<tr ><td width='6' height='30'> </td><td width='20' align='center' style='border-bottom:dashed 1px #999;'> <img id='bgimg_1' src='../../picture/0/bgg_03.gif' width='10' height='10'></td><td width='654' style='border-bottom:dashed 1px #999'><a target=_blankclass='new_blue' href='_URL_ '>_TITLE_</a></td><td width='87' class='new_blue' style='border-bottom:dashed 1px #999;'><aclass='new_blue'href='#'></a></td><td width='6' class='new_blue' > </td></tr>";
var pagecount = 30;
var totalpage = Math.ceil(9/ pagecount);
var LastPage = "上页";
var NextPage = "下页";
function ReplaceString(s, OldPattern, NewPattern) {
var i;
var s2 = s;
var len = OldPattern.length;
while (s2.indexOf(OldPattern) > 0) {
i = s2.indexOf(OldPattern);
s2 = s2.substring(0, i) + NewPattern + s2.substring(i + len, s2.length);
}
return s2;
}
function chgpage(nowpage) {
showNews(nowpage);
}
function showNews(start_num) {
start_num = parseInt(start_num);
var j = 0;
var end_num = 0;
var newshtml = "";
var pagehtml = "";
var str = "";
end_num = ((start_num + pagecount) > i) ? (i - 1) : (start_num + pagecount - 1);
for (j = start_num; j <= end_num; j++) {
str = formatstr;
str = ReplaceString(str, "_URL_", urls);
str = ReplaceString(str, "_TITLE_", headers);
str = ReplaceString(str, "_YEAR_", year);
str = ReplaceString(str, "_MONTH_", month);
str = ReplaceString(str, "_DAY_", day);
str = ReplaceString(str, "_HEAD_IMAGE_", "");
str = ReplaceString(str, "_IMAGE_", "");
newshtml = newshtml + str;
}
newshtml = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tbody>" + newshtml + " </tbody></table>";
document.getElementById("newslist").innerHTML = newshtml;
newshtml = null;
var currpage = start_num / pagecount + 1;
pagehtml = "共9条,当前显示" + i + "条,共" + totalpage + "页,每页 " + pagecount + " 条,页次" + currpage + " / " + totalpage + "页,";
if (currpage > 1) {
pagehtml += "<a href='###' class='new_blue' onclick='javascript:showNews(0)' class=pager>首页</a> ";
}
if (start_num > 0) pagehtml += "<a href='###' class='new_blue' onclick='javascript:showNews(" + (start_num - pagecount) + ");' class=pager>" + LastPage + "</a>" + " ";
if (end_num < headers.length - 1) pagehtml += "<a href='###' class='new_blue' onclick='javascript:showNews(" + (start_num + pagecount) + ");' class=pager>" + NextPage + "</a> ";
if (currpage < totalpage) {
pagehtml += " <a href='###' class='new_blue'onclick='javascript:showNews(" + ((totalpage - 1) * pagecount) + ")' class=pager>尾页</a> ";
pagehtml += "";
}
pagehtml += " 跳转到第<select onchange=chgpage(this.value) class=pager>";
for (var k = 1; k <= totalpage; k++) {
var thisnum = ((k - 1) * pagecount);
pagehtml += "<option value=" + thisnum;
pagehtml += (start_num == thisnum) ? " selected": "";
pagehtml += ">" + k + "</option>";
}
pagehtml += "</select>页 ";
用手工填写列表规则
urls='../../[参数]'; 楼上正解~ 一天,坐公交车,www.hw6.com年轻嘛嘛哄小孩吃奶说:你不喝给旁边叔叔喝哦
303718 发表于 2015-12-28 11:43
用手工填写列表规则
urls='../../[参数]';
收到谢谢。。。。。。。。。。。。。。。。。。
页:
[1]