开发者

page pagination jquery

开发者 https://www.devze.com 2023-01-10 12:52 出处:网络
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\">&l

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 开发者_如何学Cthis type of code?

<% 
while(rs.next()){

%>  
<ul class="paging">
    <li><%=rs.getString("customer_name")%></li>
</ul>

<%

}

rs.close();

%> 


it should be like this....

<ul class="paging">
<% 
    while(rs.next()){    
%>
        <li><%=rs.getString("customer_name")%></li>
<%    
    }    
    rs.close();    
%>    
</ul>
0

精彩评论

暂无评论...
验证码 换一张
取 消