上一个和下一个按钮
我的网站有上一个和下一个按钮。当页面加载时,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 CSS
display: none;
添加到“上一个”按钮,然后向该按钮添加一个onclick
事件:其中
#previous
= 上一个的 ID按钮。如果您遇到问题,请参阅此链接了解使用 JavaScript 隐藏元素的 7 种方法:
http://www.dustindiaz.com/seven-togglers/
Add a CSS
display: none;
to the Previous button then add anonclick
event to the button: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/