简体   繁体   English

如何在HTML中添加分页

[英]how to add pagination in HTML

I have created one .html page. 我已经创建了一个.html页面。 I have to use pagination in it so that i can avoid scrolling upto last page.and i can move to next page by click on button("Next") 我必须在其中使用分页,以便避免滚动到上一页。并且可以通过单击按钮(“下一页”)移至下一页。

You can create a form like this: 您可以创建如下形式:

<form action="nextpage.html" method="get">
<input type="submit" value="Next" />
</form>

That will give you a form with a button that redirects the user to the page nextpage.html 这将为您提供带有按钮的表单,该按钮会将用户重定向到页面nextpage.html。

Assuming you are looking for a way to implement pagination, take a look at this jquery plugin. 假设您正在寻找一种实现分页的方法,请看一下这个 jquery插件。 And I believe you will find a tons more plugins across the web. 而且我相信您会在网上找到更多的插件。

Use Jquery Pager 使用jQuery分页器

You can find its Demo here. 您可以在此处找到其演示。

You can do that with PHP. 您可以使用PHP做到这一点。 With PHP, you can dynamcally generate HTML pages, in this case with a certain amount of items on it and links to the next and previous page. 使用PHP,您可以动态生成HTML页面,在这种情况下,HTML页面上具有一定数量的项目,并链接到下一页和上一页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM