JS分頁效果示例
更新時(shí)間:2013年10月11日 17:47:02 作者:
JS實(shí)現(xiàn)分頁在網(wǎng)上可以搜到很多的相關(guān)文章,在本文也要為大家介紹下具體的實(shí)現(xiàn),感興趣的朋友不要錯(cuò)過
分頁
<script type="text/javascript" language="javascript" src="js/pager.js"></script>
/*--------pager-------*/
.number span a{padding:4px 6px;}
.number span a:hover{padding:4px 6px; background-color: #999;color:#FFFFFF;}
.number {margin:5px 0;font-size: 14px;font-weight: bold;color: #ff00ff;}
.number span{border:solid 1px #cccccc;background-color:#FFFFFF;color:#666666;line-height:20px;display:inline-block;margin-left:4px;margin-right:4px;}
#a_title{ text-align:center; height:30px; line-height:30px;font-size:18px; font-weight:bolder; display:block}
#a_smalltitle{font-size:14px; font-weight:bolder; text-align:center;display:block;}
.a_about{text-align:center; display:block; height:20px; line-height:20px; background:#F3F8F7}
#a_content{padding:10px; height:auto;overflow:hidden;text-align:left;line-height: 200%; word-break:break-all;}
#a_near{padding-left:20px; margin:5px 0; height:auto}
.Red{ color:Red}
<p class="nav">
<!--js分頁-->
<script type="text/javascript" language="javascript">
var pg = new showPages('pg');
pg.pageCount = <% =PageCount %>;
pg.printHtml();
</script>
</p>
</div>
public void Bind()
{
Maticsoft.BLL.news bllnews = new Maticsoft.BLL.news();
PagedDataSource ps = new PagedDataSource();
ps.DataSource = bllnews.GetAllList().Tables[0].DefaultView;
ps.AllowPaging = true;
ps.PageSize = 5;//分頁大小
ps.CurrentPageIndex = currentPage - 1;
pageCount = ps.PageCount.ToString();
r1.DataSource = ps;
r1.DataBind();
}
復(fù)制代碼 代碼如下:
<script type="text/javascript" language="javascript" src="js/pager.js"></script>
復(fù)制代碼 代碼如下:
/*--------pager-------*/
.number span a{padding:4px 6px;}
.number span a:hover{padding:4px 6px; background-color: #999;color:#FFFFFF;}
.number {margin:5px 0;font-size: 14px;font-weight: bold;color: #ff00ff;}
.number span{border:solid 1px #cccccc;background-color:#FFFFFF;color:#666666;line-height:20px;display:inline-block;margin-left:4px;margin-right:4px;}
#a_title{ text-align:center; height:30px; line-height:30px;font-size:18px; font-weight:bolder; display:block}
#a_smalltitle{font-size:14px; font-weight:bolder; text-align:center;display:block;}
.a_about{text-align:center; display:block; height:20px; line-height:20px; background:#F3F8F7}
#a_content{padding:10px; height:auto;overflow:hidden;text-align:left;line-height: 200%; word-break:break-all;}
#a_near{padding-left:20px; margin:5px 0; height:auto}
.Red{ color:Red}
<p class="nav">
<!--js分頁-->
<script type="text/javascript" language="javascript">
var pg = new showPages('pg');
pg.pageCount = <% =PageCount %>;
pg.printHtml();
</script>
</p>
</div>
public void Bind()
{
Maticsoft.BLL.news bllnews = new Maticsoft.BLL.news();
PagedDataSource ps = new PagedDataSource();
ps.DataSource = bllnews.GetAllList().Tables[0].DefaultView;
ps.AllowPaging = true;
ps.PageSize = 5;//分頁大小
ps.CurrentPageIndex = currentPage - 1;
pageCount = ps.PageCount.ToString();
r1.DataSource = ps;
r1.DataBind();
}
相關(guān)文章
JS實(shí)現(xiàn)星星評分功能實(shí)例代碼(兩種方法)
這篇文章主要介紹了JS實(shí)現(xiàn)星星評分功能實(shí)例代碼(兩種方法)的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-06-06
JS實(shí)現(xiàn)的Select三級下拉菜單代碼
這篇文章主要介紹了JS實(shí)現(xiàn)的Select三級下拉菜單,涉及javascript動(dòng)態(tài)創(chuàng)建下拉列表的技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-08-08
layui點(diǎn)擊導(dǎo)航欄刷新tab頁的示例代碼
今天小編就為大家分享一篇layui點(diǎn)擊導(dǎo)航欄刷新tab頁的示例代碼,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-08-08
JavaScript實(shí)現(xiàn)網(wǎng)頁動(dòng)態(tài)生成表格
這篇文章主要為大家詳細(xì)介紹了JavaScript實(shí)現(xiàn)網(wǎng)頁動(dòng)態(tài)生成表格,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2020-11-11
Bootstrap導(dǎo)航條學(xué)習(xí)使用(二)
這篇文章主要為大家詳細(xì)介紹了Bootstrap導(dǎo)航條的使用方法第二篇,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-02-02

