嵌套HTML-锚点标签 [英] Nesting HTML- anchor tags
问题描述
我想使用一个嵌套的锚点,它不起作用,因为它是不允许。然后,我看到 Pageflakes 上的tab导航实际上正在运行(包括嵌套超链接)。为什么?
他们必须使用JavaScript来做一些非常疯狂的事情才能使其发挥作用(请注意,嵌套锚定标记具有名称或href属性 - 所有功能都通过类名称和JS完成。)
以下是html的样子:
< a class =page_tab page_tab>
< div class =page_titletitle =点击重命名此页面。>点击&输入页面名称< / div>
< / a>
Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab).
I wanted to use a nested anchor, which didn't work because it is not allowed. Then I saw the tab- navigation at Pageflakes, which was actually working (including nested hyperlinks). Why?
They must be doing some really crazy stuff with JavaScript to get it to work (notice how neither the parent nor the nested anchor tags have a name or href attribute - all functionality is done through the class name and JS).
Here is what the html looks like:
<a class="page_tab page_tab">
<div class="page_title" title="Click to rename this page.">Click & Type Page Name</div>
<a class="delete_page" title="Click to delete this page" style="display: block;">X</a>
</a>
这篇关于嵌套HTML-锚点标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!