自己写的分页条

本文详细介绍了如何实现网页的分页与导航功能,包括如何展示当前页数、总页数、记录总数、每页显示记录数,以及如何通过按钮实现首页、上页、下页、尾页和跳转到指定页的功能。同时,文章提供了关键代码片段,展示了如何使用MXML语言来实现这些功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="30"
 horizontalAlign="center" verticalAlign="middle"
    borderStyle="solid" cornerRadius="4">

<mx:Label text="{'第'+(sumPage>0?(currentPage+1):0)+'页/共'+sumPage+'页'}"/>
 <mx:Label text="{'共'+(totalRecords!=0?totalRecords:0)+'条记录'}"/>
 <mx:Label text="每页显示"/>
 <mx:NumericStepper id="pageSizePer" stepSize="1" minimum="1" maximum="50"  value="{WorkFlowConst.SIZE_PER_PAGE}" />
 <mx:Label text="条记录"/>
 <mx:LinkButton icon="@Embed(source='../img/up.png')" enabled="{currentPage!=0}"
       label="首页" toolTip="跳转到第一页" click="queryData(0)"/>
 <mx:LinkButton icon="@Embed(source='../img/right.png')" enabled="{sumPage>currentPage+1}"
       label="下页" toolTip="跳转到下一页" click="queryData(currentPage+1)"/>
 <mx:LinkButton icon="@Embed(source='../img/left.png')" enabled="{currentPage!=0}"
       label="上页" toolTip="跳转到上一页" click="queryData(currentPage-1)"/>
 <mx:LinkButton icon="@Embed(source='../img/down.png')"  enabled="{sumPage>currentPage+1}"
       label="尾页" toolTip="跳转到尾页" click="queryData(sumPage-1)"/>
 <mx:NumericStepper id="whichPage" stepSize="1" minimum="1" maximum="{sumPage}" value="1"/>
 <mx:LinkButton icon="@Embed(source='../img/pagego.png')" enabled="{sumPage>1}"
       label="跳转" toolTip="跳转到这一页" click="queryData(whichPage.value-1)"/>
</mx:HBox>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值