是否有可能禁用链接提示? [英] Is it possible to disable tooltips for links?

查看:96
本文介绍了是否有可能禁用链接提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有对我的链接设置任何所有权或ALT标签等等IE10使用,当我悬停或单击并按住链接工具提示中的href内容。我一直在四处寻找,但我无法找到重写此功能的任何解决方案。

I don't have any title or alt tags set on my links so IE10 uses the href content for tooltips when I hover or click and hold a link. I've been looking around but I can't find any solutions for overriding this functionality.

更新:

我已经想通了另一个问题,我有一个解决方案。当你感动,并举行,一个奇怪的方形会弹出。要解决,我用这条线code的。

I've figured a solution for another problem I've had. When you touched and held, a weird square would pop up. To fix that I used this line of code.

document.addEventListener("MSHoldVisual", function(e) { e.preventDefault(); }, false);

我仍然试图找到一个解决办法禁用工具提示进行触摸操作。

I'm still trying to find a solution to disable the tooltip for touch actions.

推荐答案

您可以设置空的title属性:

You can set empty title attribute:

document.addEventListener('mouseover', function(e){
    if(e.target.tagName === 'A' && !e.target.getAttribute('title'))
        e.target.setAttribute('title', '');
});

这篇关于是否有可能禁用链接提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆