<script> <BR>function int(I,k) <BR>{ <BR>//define variable <BR>var ff=0; <BR>var j; <BR>j=Math.round(I/k)-I/k; <BR>if (j!=0){ <BR>ff=Math.round(I/k)+1;} <BR>else <BR>{ <BR>ff=Math.round(I/k); <BR>} <BR>return ff; <BR>} <BR>function querystring(qs){ <BR>s=location.href; <BR>s=s.replace("?","?&").split("&"); <BR>re=""; <BR>for(i=1;i<s.length;i++){ <BR>if(s[i].indexOf(qs+"=")==0){ <BR> re=s[i].replace(qs+"=",""); <BR> } <BR>} <BR> return re; <BR>} <BR> var page=querystring("page") <BR> if(page==false){ <BR>page=1 <BR>} <BR> var maxperpage=4 //每页显示条数,这里每页显示4张 <BR> var totalimg=8 //一共有多少张图片这里共8张 <BR> var filename="list.htm" //这个文件的名称 <BR> var pagecounts <BR> var cnum,snum,onum,endnum,kstr <BR> var startnum=((page-1)*maxperpage); <BR> endnum=startnum+maxperpage; <BR> var x=0; <BR> pagecounts=int(totalimg,maxperpage) <BR> if(page==pagecounts){ <BR> endnum=((pagecounts-1)*maxperpage)+totalimg-(pagecounts-1)*maxperpage <BR> } <BR> for(k=startnum+1;k<=endnum;k++){ <BR> kstr=k.toString(); <BR> if(k<10){ <BR> kstr="00"+kstr <BR> } <BR> else <BR> { <BR> kstr="0"+kstr <BR> } <BR> x+=1; <BR> //显示数据 <BR> if(x%2==0){ <BR> document.write("<td><img src=img/LX-"+kstr+".jpg style="max-width:90%"cursor:hand' alt="图片分页查看[原创]_图象特效" >"); <BR> }else{ <BR> document.write("<tr><td><img src=img/LX-"+kstr+".jpg style="max-width:90%"cursor:hand' alt="图片分页查看[原创]_图象特效" >"); <BR> } <BR> } <BR> </script>
|
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
作者最新文章
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31