jQuery html 页面的上一个和下一个按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16395963/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Previous and Next button for a html page
提问by Thejdeep
I'm creating some 10 HTML pages in my website. I would like to have a previous and next navigation button/link in all pages.so how can we get this?
我在我的网站上创建了大约 10 个 HTML 页面。我想在所有页面中都有一个上一个和下一个导航按钮/链接。那么我们怎样才能得到这个?
回答by D P Venkatesh
Since your question not clear, Let me assume you have 10 static html pages.
由于您的问题不清楚,让我假设您有 10 个静态 html 页面。
now u just add the following code in all pages
现在你只需在所有页面中添加以下代码
<input type="button" name="b1" value="prev" onclick="location.href='pre_page.html'">
<input type="button" name="b2" value="next" onclick="location.href='next_page.html'">
If this is not what you are looking for, please explain your requirements in more detail.
如果这不是您要查找的内容,请更详细地说明您的要求。
回答by Nitesh
You can do the below for your static HTML pages.
您可以对静态 HTML 页面执行以下操作。
<a href="xxx.html">Back</a>|<a href="xxx.html">Next</a>
You have to manually put the html links on your individual pages that you want to show as previous or next for those individual pages.
您必须手动将 html 链接放在要显示为这些单独页面的上一个或下一个页面的各个页面上。
回答by uzair
If yours is a Static Website with just 10 pages to navigate two and fro, Add the manual navigation links.
如果您的静态网站只有 10 个页面可以来回导航,请添加手动导航链接。
<a href="prev-page.html"> Previous Page </a>
<a href="next-page.html"> Next Page </a>
However if its not static there are many Pagination scripts that can be handy. just Google it.
但是,如果它不是静态的,则有许多分页脚本可以派上用场。只是谷歌它。