index.html#(number) 内的 href # 问题
我的网站是围绕一个 coda 滑块构建的,当从导航菜单中选择不同的 div 时,该滑块会显示不同的 div,例如主页是 www.mysite.com/index.html#1
,关于我们是 www。 mysite.com/index.html#2
,等等。
在“关于我们”div (#2) 中,我有一个滑动表单,其中有四个依次显示的 div。我遵循的设置滑动表单的教程表示使用 Next div
之类的链接来允许用户切换 div。但这些链接在我的网站中不起作用,因为当用户看到该表单时,他们已经位于index.html#2。
抱歉,这太令人困惑了,但是我怎样才能使链接正常工作呢?我只需要另一种指定 div 链接的方法,这样我的网站就不会与链接混淆。
My site is built around a coda slider which shows different divs when they are selected from the navigation menu e.g home is www.mysite.com/index.html#1
, about us is www.mysite.com/index.html#2
, and so on.
Within the about us div (#2) I have a sliding form which has four divs that display one after the other. The tutorial I followed to set up the sliding form said to use links like <a href="#">Next div</a>
to allow the user to switch divs. But the links don't work within my site because the user is already at index.html#2 when they see the form.
I'm sorry that this is so confusing but how can I get the links to work? I just need another way of specifying links to the divs so that my site doesn't get confused with the links.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为本教程意味着您要在其上实现一个 JavaScript 事件来切换链接,它看起来像这样:
return false 是为了阻止链接工作,但仅调用 JavaScript。
I think the tutorial means that you implement a JavaScript event on that to switch the link, it looks like this:
the return false is to prevent the link from working, but to invoke the JavaScript only.