上一个和下一个按钮

发布于 2024-09-01 18:06:58 字数 119 浏览 2 评论 0原文

我的网站有上一个和下一个按钮。当页面加载时,id像上一个按钮一样不可见。(在第一个面板上) 用户单击下一个按钮(转到第二个面板)后,会出现上一个按钮的 id。

有一些 javascript 可以做到这一点吗?

My website has previous and next buttons. When the page loads id like the previous button to be invisible.(on the first panel)
After the user clicks the next button (to go to 2nd panel), id like the previous button to appear.

Is there some javascript that will do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

古镇旧梦 2024-09-08 18:06:58

将 CSS display: none; 添加到“上一个”按钮,然后向该按钮添加一个 onclick 事件:

<input id="next" type="button" name="next" onclick="document.getElementById('previous').style.display = 'block';
" />

其中 #previous = 上一个的 ID按钮。

如果您遇到问题,请参阅此链接了解使用 JavaScript 隐藏元素的 7 种方法:
http://www.dustindiaz.com/seven-togglers/

Add a CSS display: none; to the Previous button then add an onclick event to the button:

<input id="next" type="button" name="next" onclick="document.getElementById('previous').style.display = 'block';
" />

Where #previous = the ID of your previous button.

If you are having trouble, see this link for 7 ways to hide elements using JavaScript:
http://www.dustindiaz.com/seven-togglers/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文