2021年3月31日星期三

How is this html javascript pagination working?

This code allows clicking a number and it goes to that page. How is it doing that and how can I go to a specific page directly?

The url does contain &page=9, for example, that updates as I click different numbers in the code below, but manually changing it from &page=9 to &page=10 just reloads page 9.

Thanks.

<div class="paging-div">  <div class="paging-count">Showing: 151 to 175 of 14259 results</div>  <ul class="pagination">  <li data-page="6">  <a href="javascript:void(0)">&lt;</a>  </li>  <li data-page="1">  <a href="javascript:void(0)">1</a>  </li>  <li class="paging-button disabled">  <a href="javascript:void(0)">...</a>  </li>  <li data-page="5">  <a href="javascript:void(0)">5</a>  </li>  <li data-page="6">  <a href="javascript:void(0)">6</a>  </li>  <li data-page="7" class="active">  <a href="javascript:void(0)">7</a>  </li>  <li data-page="8">  <a href="javascript:void(0)">8</a>  </li>  <li data-page="9">  <a href="javascript:void(0)">9</a>  </li>  <li data-page="8">  <a href="javascript:void(0)">&gt;</a>  </li>  </ul>  </div>  
https://stackoverflow.com/questions/66898286/how-is-this-html-javascript-pagination-working April 01, 2021 at 12:07PM

没有评论:

发表评论