日期:2014-05-17  浏览次数:20518 次

第一次需要写个PHP,请求老师帮助!!
html部分代码:
 <SCRIPT LANGUAGE="JavaScript">
 <!--
 var pictree = ['1341972991328.html','1341972991534.html','1341972991731.html','1341972991929.html','1341972992128.html','1341972992341.html','1341972992586.html','1341972992780.html','1341972992972.html','1341972993169.html','1341972993363.html','1341972993560.html','1341972993749.html','1341972993955.html','1341972994153.html'];
 //-->
 </SCRIPT>
<input type="hidden" name="thePage" id="thePage" value="1" />
<input type="hidden" name="thePath" id="thePath" value="080819/hyrz008081909/1341972991328/" />
<input type="hidden" name="maxPage" id="maxPage" value="15" />
<script type="text/javascript" src="http://static.bengou.com/js2/guga_pageend.js"></script>
<script type="text/javascript"> 
var nextChapter = chaptertree[468];
document.body.onfocus;
ns4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;
document.onkeydown = function (event){ keyDown(event)};
if(ns4)
{
document.captureEvents(Event.KEYDOWN);
}
</script>
其中,需要获取var pictree、<input type="hidden" name="thePath" id="thePath" 里的值,然后用 thePath 连接数组pictree里的每个值。如:080819/hyrz008081909/1341972991328/1341972991328.html,080819/hyrz008081909/1341972991328/1341972991731.html……

其中每个页面pictree thepath 是变化的

------解决方案--------------------
JScript code
var pictree = ['1341972991328.html','1341972991534.html','1341972991731.html','1341972991929.html','1341972992128.html'];
var v=document.getElementById('thePath').value;
var arr=new Array();
for(var i=0,len=pictree.length;i<len;i++) arr.push(v+pictree[i]);
alert(arr);

------解决方案--------------------
数据源是js or PHP ? 还是表单提交给PHP ? 你并没有说清楚逻辑?