jquery页面分页
我尝试过使用 jquery 来进行页面分页。该示例显示以下内容:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript" src="quickpager.jquery.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
$(document).ready(function() {
$("ul.paging").quickPager();
$("ul.paging2").quickPager({pagerLocation:"both"});
});
/* ]]> */
</script>
<body>
<h1>SimplePager demo page</h1>
<p><a href="http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist">back to blog post</a></p>
<code>
<pre>
$("ul.paging").quickPager();
</pre>
</code>
<ul class="paging">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
</ul>
它正在显示页面中的每 10 条记录 :# refrence:http://www.geckonewmedia.com/blog/2009/8/20/simplepager---jquery-paging-plugin- -更新
我使用了相同的方法,但尝试从数据库检索值而不是硬编码,但分页不存在,仅检索了20条记录而没有分页。我可以做这种类型的代码吗?
<%
while(rs.next()){
%>
<ul class="paging">
<li><%=rs.getString("customer_name")%></li>
</ul>
<%
}
rs.close();
%>
I have tried a jquery to do the page pagination. The example is showing the following:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript" src="quickpager.jquery.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
$(document).ready(function() {
$("ul.paging").quickPager();
$("ul.paging2").quickPager({pagerLocation:"both"});
});
/* ]]> */
</script>
<body>
<h1>SimplePager demo page</h1>
<p><a href="http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist">back to blog post</a></p>
<code>
<pre>
$("ul.paging").quickPager();
</pre>
</code>
<ul class="paging">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
</ul>
It is diaplaying each 10records in a page :# refrence:http://www.geckonewmedia.com/blog/2009/8/20/simplepager---jquery-paging-plugin--
updated
I used the same, but tried to retrieve the values from the db instead of hard coding, but the pagination is not there, only the 20 records retrieved without the pagination. Can I do this type of code?
<%
while(rs.next()){
%>
<ul class="paging">
<li><%=rs.getString("customer_name")%></li>
</ul>
<%
}
rs.close();
%>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该是这样的......
it should be like this....