1. <tfoot id='syvZF'></tfoot>

  2. <legend id='syvZF'><style id='syvZF'><dir id='syvZF'><q id='syvZF'></q></dir></style></legend>

      <bdo id='syvZF'></bdo><ul id='syvZF'></ul>
    <i id='syvZF'><tr id='syvZF'><dt id='syvZF'><q id='syvZF'><span id='syvZF'><b id='syvZF'><form id='syvZF'><ins id='syvZF'></ins><ul id='syvZF'></ul><sub id='syvZF'></sub></form><legend id='syvZF'></legend><bdo id='syvZF'><pre id='syvZF'><center id='syvZF'></center></pre></bdo></b><th id='syvZF'></th></span></q></dt></tr></i><div id='syvZF'><tfoot id='syvZF'></tfoot><dl id='syvZF'><fieldset id='syvZF'></fieldset></dl></div>
  3. <small id='syvZF'></small><noframes id='syvZF'>

      悬停时隐藏标题标签

      Hiding title tags on hover(悬停时隐藏标题标签)
      <legend id='H1WY9'><style id='H1WY9'><dir id='H1WY9'><q id='H1WY9'></q></dir></style></legend>

      1. <small id='H1WY9'></small><noframes id='H1WY9'>

          <tbody id='H1WY9'></tbody>
        <tfoot id='H1WY9'></tfoot>

          <i id='H1WY9'><tr id='H1WY9'><dt id='H1WY9'><q id='H1WY9'><span id='H1WY9'><b id='H1WY9'><form id='H1WY9'><ins id='H1WY9'></ins><ul id='H1WY9'></ul><sub id='H1WY9'></sub></form><legend id='H1WY9'></legend><bdo id='H1WY9'><pre id='H1WY9'><center id='H1WY9'></center></pre></bdo></b><th id='H1WY9'></th></span></q></dt></tr></i><div id='H1WY9'><tfoot id='H1WY9'></tfoot><dl id='H1WY9'><fieldset id='H1WY9'></fieldset></dl></div>
              <bdo id='H1WY9'></bdo><ul id='H1WY9'></ul>
              1. 本文介绍了悬停时隐藏标题标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我查看了以前的问题,但没有一个对我真正有用,我检查了谷歌,发现的信息似乎很模糊,所以我想我会在这里尝试.

                I've looked through previous questions and none of them have really worked for me, i've checked google to and the information I found seems pretty vague, so I thought i'd try here.

                是否有人知道/或已经解决了在悬停时显示标题标签的问题.我有一系列链接和图像将被分配标题标签,但是,其中一些将显示最好不要在悬停时弹出的信息.

                Is anyone aware/or have tackle the problem of title tags displaying on hover. I have a series of links and images that will be assigned title tags, however, some of them will be displaying information that would be better off not popping up on hover.

                我可以使用一个全局函数将其应用于各种标题标签吗?一个例子如下:

                Is there a global function I could use to apply this to all manner of title tags? An example would be as follows:

                <a href="service.php" title="services for cars" />
                

                如果可能,我想禁用悬停时出现的标题来自汽车的服务".

                If possible I would like to disable the title "services from cars" appearing on hover.

                再次感谢.

                推荐答案

                这应该可以很好地禁用单个标题:

                This should work just fine to disable single title:

                <a href="service.php" title="services for cars" onmouseover="this.title='';" />
                

                如果你以后需要标题,你可以恢复它:

                If you need the title afterwards, you can restore it:

                <a href="service.php" title="services for cars" onmouseover="this.setAttribute('org_title', this.title'); this.title='';" onmouseout="this.title = this.getAttribute('org_title');" />
                

                这种方式虽然不是通用的.. 要将其应用于所有锚点,请使用这样的 JavaScript 代码:

                This way is not generic though.. to have it applied to all the anchors, have such JavaScript code:

                window.onload = function() {
                    var links = document.getElementsByTagName("a");
                    for (var i = 0; i < links.length; i++) {
                        var link = links[i];
                        link.onmouseover = function() {
                            this.setAttribute("org_title", this.title);
                            this.title = "";
                        };
                        link.onmouseout = function() {
                            this.title = this.getAttribute("org_title");
                        };
                    }
                };
                

                现场测试用例.

                为更多标签应用相同的内容(例如<img>)首先将代码的核心移动到一个函数中:

                to apply same for more tags (e.g. <img>) first move the core of the code to a function:

                function DisableToolTip(elements) {
                    for (var i = 0; i < elements.length; i++) {
                        var element = elements[i];
                        element.onmouseover = function() {
                            this.setAttribute("org_title", this.title);
                            this.title = "";
                        };
                        element.onmouseout = function() {
                            this.title = this.getAttribute("org_title");
                        };
                    }
                }
                

                然后把代码改成:

                window.onload = function() {
                    var links = document.getElementsByTagName("a");
                    DisableToolTip(links);
                    var images = document.getElementsByTagName("img");
                    DisableToolTip(images);
                };
                

                这篇关于悬停时隐藏标题标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)
                Is it possible to compile Coffeescript code in script tags in html files?(是否可以在 html 文件的脚本标签中编译 Coffeescript 代码?)

                  <tfoot id='5jB74'></tfoot>

                    <legend id='5jB74'><style id='5jB74'><dir id='5jB74'><q id='5jB74'></q></dir></style></legend>
                    1. <i id='5jB74'><tr id='5jB74'><dt id='5jB74'><q id='5jB74'><span id='5jB74'><b id='5jB74'><form id='5jB74'><ins id='5jB74'></ins><ul id='5jB74'></ul><sub id='5jB74'></sub></form><legend id='5jB74'></legend><bdo id='5jB74'><pre id='5jB74'><center id='5jB74'></center></pre></bdo></b><th id='5jB74'></th></span></q></dt></tr></i><div id='5jB74'><tfoot id='5jB74'></tfoot><dl id='5jB74'><fieldset id='5jB74'></fieldset></dl></div>
                          <bdo id='5jB74'></bdo><ul id='5jB74'></ul>
                            <tbody id='5jB74'></tbody>

                          <small id='5jB74'></small><noframes id='5jB74'>