Nesting HTML- anchor tags(嵌套 HTML 锚标记)
问题描述
今天我正在研究网页的标签导航.我尝试了 滑动门 方法,效果很好.然后我意识到我必须包含一个删除选项卡的选项(通常是每个选项卡右上角的一个小 X).
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).
我想使用嵌套锚,但它不起作用,因为它是 不允许.然后我在 Pageflakes 上看到了选项卡导航,它实际上在工作(包括嵌套的超链接).为什么?
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?
推荐答案
他们必须用 JavaScript 做一些非常疯狂的事情才能让它工作(注意父锚标签和嵌套锚标签都没有 name 或 href 属性 -所有功能都是通过类名和 JS 完成的).
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).
这是 html 的样子:
Here is what the html looks like:
<a class="page_tab page_tab">
<div class="page_title" title="Q2xpY2sgdG8gcmVuYW1lIHRoaXMgcGFnZS4=">Click & Type Page Name</div>
<a class="delete_page" title="Q2xpY2sgdG8gZGVsZXRlIHRoaXMgcGFnZQ==" style="display: block;">X</a>
</a>
这篇关于嵌套 HTML 锚标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:嵌套 HTML 锚标记


- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01