thinkfor 发表于 2008-12-6 22:53:08

采集内容页图片问题

内容页图片的代码如下。如何写规则

<script type="text/javascript" src="http://www.Xxxxxx.cn/js/article_gal.lib.js"></script>
   <script type="text/javascript">
   var picURL = ""; //所有图片地址
   var picTITLE = ""; //所有图片标题
   
   var picURLArray,picTITLEArray;
   
   var fristPicURL = "";//第一张图片的地址
   var fristPicTITLE = ""; //第一张图片的标题
   
   var picCount = 0; //图片数

   picURL = "http://img.xxxx.COM/1_2_1213943203756.jpg";
   picTITLE = "金秀仁";
   fristPicURL = "http://img.xxxx.COM/1_2_1213943203756.jpg";
   fristPicTITLE = "金秀仁";
   


picCount++;

   


   picURL = picURL + "|" + "http://img.xxxx.COM/2_2_1213943203756.jpg";
   picTITLE = picTITLE + "|" + "朴珍熙";



picCount++;

   
   
picURLArray = picURL.split("|");
picTITLEArray = picTITLE.split("|");

var currIndex = getSearchValue("URL","ipn");
if(currIndex < 1){
   currIndex = 1;
}
</script>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" align="center" >
   <tr>
<td bgcolor="#FFFFFF"><img src="" border="0" class="img_border" id="articlePicImg"style="cursor:pointer" alt="点击查看下一张"></td>
   </tr>
</table>
<table width="96%" border="0" cellspacing="10" cellpadding="0" >
   <tr>
<td align="center" class="pptimg_title" id="articlePicTitle">loading...</td>
   </tr>
   <tr>
<td align="center"><a href="javascript:perv()" class="pptimg_page">
<img src="http://www.Xxxxxx.cn/images/btn_prvi.gif"border="0"></a>  <span id="currIndexSpan">1</span> of <span id="picCountSpan">2</span>  <a href="javascript:next()"><img src="http://www.Xxxxxx.cn/images/btn_nxti.gif"border="0"></a></td>
   </tr>
   <tr>
<td align="center"><hr color="#D1D0C3" noshade size="1" width="90%" /></td>
   </tr>
</table>
<script type="text/javascript">
document.getElementById("currIndexSpan").innerHTML = currIndex;
document.getElementById("picCountSpan").innerHTML = picCount;
document.getElementById("articlePicImg").src = picURLArray;
document.getElementById("articlePicTitle").innerHTML = picTITLEArray;

function perv(){
if(currIndex > 1){
   removeSearch("URL","ipn");
   this.location.search = addSearch("URL","ipn",--currIndex);
}
}

function next(){
if(currIndex < picCount){
   removeSearch("URL","ipn");
   this.location.search = addSearch("URL","ipn",++currIndex);
}
}
</script>

孤魂 发表于 2008-12-6 23:18:23

我想根据以上代码,没人能写出来

thinkfor 发表于 2008-12-6 23:41:04

原帖由 孤魂 于 2008-12-6 23:18 发表 http://bbs.locoy.com/images/common/back.gif
我想根据以上代码,没人能写出来

前后只有一个DIV。。还需要其他的什么条件么?

[ 本帖最后由 thinkfor 于 2008-12-7 00:15 编辑 ]

sushy 发表于 2008-12-8 12:33:00

fristPicURL = "http://img.xxxx.COM/1_2_1213943203756.jpg";
采集这里就好了
页: [1]
查看完整版本: 采集内容页图片问题