简体   繁体   English

简单的HTML内部链接问题

[英]Simple HTML internal link question

Weired, simple HTML stuff didn't work as expected. 奇怪的是,简单的HTML内容无法按预期工作。 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. 在第1页上,名为page1.cfm的Railo脚本具有以下行: <a href="page2.html#part2">Go To Page 2, Part 2</a>因此,我们希望该链接能够带来用户访问page2.html页面的第2部分部分,是的,该部分以及内部链接标记位于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. 但是使用Firefox 3.6.x进行了测试,该链接只是转到page2.html,而不是pag2.html的Part 2部分。 How come? 怎么会?

What am I missing here? 我在这里想念什么?

Thanks. 谢谢。

这可能只是页面长度的问题,如果页面可以滚动,则查看端口只能滚动以具有#part2节。

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 as id ). 如果评估整个DOM,则可能存在一些小写/大写问题,一个重复的条目名为“ part2”可能导致类似的错误(检查name -attribute以及id )。 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: 除此之外,您还可以尝试一些常规操作:

  • Try to see if you can reproduce the bug that you're currently experiencing in FF with just straight HTML & Javascript. 尝试看看是否可以仅使用简单的HTML和Javascript重现FF中当前遇到的错误。 (I'm going to guess - 'No') (我猜-'不')
  • Try to reproduce the bug using the smallest possible test case with your .CFM files. 尝试使用最小的测试用例和.CFM文件来重现该错误。
  • Check any/all of your Javascript with JSLint . 使用JSLint检查您的Javascript中的任何/全部。
  • Check FireFox's Bugzilla for any known .cfm issues. 检查FireFox的Bugzilla是否存在任何已知的.cfm问题。

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. 干杯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM