1个回答
展开全部
假设一组图片:Image0,Image1,Image2......Image19
<script language="javascript">
var pageSizes = 5; //分每页5张
var currentPage = parseInt('<%=request("page")%>'); //取得当前页码
var recordCount = 20; //图片数量
if(currentPage<1 || currentPage == NaN){
currentPage = 1;
}
for(var i=0;i<recordCount;i++){
if((currentPage-1)*pageSizes <= i < currentPage*pageSizes){
document.all["Image" + i].style.display = '';
}else{
document.all["Image" + i].style.display = 'none';
}
}
</script>
<script language="javascript">
var pageSizes = 5; //分每页5张
var currentPage = parseInt('<%=request("page")%>'); //取得当前页码
var recordCount = 20; //图片数量
if(currentPage<1 || currentPage == NaN){
currentPage = 1;
}
for(var i=0;i<recordCount;i++){
if((currentPage-1)*pageSizes <= i < currentPage*pageSizes){
document.all["Image" + i].style.display = '';
}else{
document.all["Image" + i].style.display = 'none';
}
}
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询