简单的HTML内部链接问题
奇怪的、简单的 HTML 内容并没有按预期工作。 在第 1 页上,有一个名为 page1.cfm 的 Railo 脚本, 它有以下行: 转到第 2 页,第 2 部分
因此,我们预计该链接会将用户带到 page2.html 页面的第 2 部分,并且该部分和内部链接标记存在于 page2.html 上。
但使用 Firefox 3.6.x 进行测试时,该链接只是转到 page2.html,而不是 pag2.html 的第 2 部分。怎么会?
我在这里缺少什么?
谢谢。
Weired, simple HTML stuff didn't work as expected.
On page 1, a Railo script named page1.cfm,
it has the following line:<a href="page2.html#part2">Go To Page 2, Part 2</a>
so, we expect the link would bring the user to the page2.html page's Part 2 section and yes this section and the internal link tag exists on page2.html.
But tested with Firefox 3.6.x, the link simply goes to the page2.html instead of the pag2.html's Part 2 section. How come?
What am I missing here?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
小写/大写可能存在一些问题,如果评估整个 DOM,则名为“part2”的重复条目可能会导致类似的错误(检查
name
-attribute 以及id)。为了更好地理解问题,需要确切的代码。
There might be some issue with lower/uppercase, if the whole DOM is evaluated a duplicate entry named "part2" might lead to a similar error (check
name
-attribute as well asid
). To get a better understanding of the problem, the exact code would be needed.如果您能够发布一小段代码来演示该问题,那将会很有帮助。除此之外,您还可以尝试一些一般性的操作:
通常,刚开始隔离问题就可以突出一些看不见的问题,从而使您能够快速解决问题。如果错误仍然存在,请告诉我们,我们可以从那里开始......
干杯。
It would be helpful if you were able to post a small section of code that demonstrates the problem. Outside of that, there's a few general things you can try:
Often, just starting to isolate the issue can highlight little unseen problems that allow you to solve it quickly. If the bug persists, let us know, and we can go from there....
Cheers.
这可能只是页面长度的问题,如果页面可以滚动,则视图端口只能滚动到
#part2
部分。It might be simply a question of page-length, the view port can only scroll to have
#part2
section if the page can scroll.