隐藏状态栏上的锚点显示 [英] Hide anchor display on status bar

查看:239
本文介绍了隐藏状态栏上的锚点显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个jQuery UI Webapp,其中在窗口底部使用固定的状态栏"来显示小片段的相关信息(在需要时).该信息显示在状态栏的左下角.到目前为止一切都很好.我遇到的问题是-我的webapp中有很多锚.例如,在应用程序的左侧,我显示了一个jstree树形视图,其中有许多

I am creating a jQuery UI webapp in which I use a fixed "status bar" at the bottom of the window to show small snippets of relevant information as and when required. The information appears in the bottom left hand corner of the status bar. All good thus far. The issue that I run into is this - I have tons of anchors in my webapp. For instance, on the left hand side of the app I show a jstree treeview which has many

<a href='#'>...

锚元素.当前正在发生的事情是,当用户将鼠标悬停在这样的树状视图项(或其他锚点)上时,浏览器(谷歌浏览器)会非常有帮助地弹出左下角的链接URL.我想其他浏览器也会做类似的事情,但是现在我仅在Chrome上进行测试,从长远来看,这才是真正重要的两个Webkit浏览器.

anchor elements. What is currently happening is that when the user hovers over such a treeview item (or for that matter another anchor) the browser (Google Chrome) very helpfully pops up the link URL in the bottom left hand corner. I suppose other browsers do similar things but right now I am testing only with Chrome and even in the longer term it is the two webkit browsers that really matter.

嗯...有用的链接URL弹出窗口在正常"网页中非常方便且有用,但是在我的webapp中完全不合适.有什么办法可以抑制它?从我所做的所有阅读中,我发现大多数浏览器都阻止了这种抑制,因为这可能是一个潜在的安全漏洞.

Hmmm... that helpful link URL popup is handy and useful in a "normal" web page but it is completely out of place in my webapp. Is there any way I can suppresss it? From all the reading I have done I have gathered that such suppression is blocked by most browsers since it would be a potential security loophole.

当然,我可以让我自己的提示文本"出现在其他地方,但是那不太恰当.我在这里能做些什么吗?还是被弹出窗口卡住了?非常感谢您的帮助.

Sure, I could get my own "hint text" to appear elsewhere but that would be rather incongruous. Is there anything I can do here or am I stuck with the popup? I'd much appreciate any help.

推荐答案

如果使用<a>元素,则浏览器将始终在悬停时显示地址,正如您所说的主要出于安全原因.

If you use <a> elements, the browser will always show the address on hover, as you said mainly for security reasons.

但是,您可以使用用作链接的<span>元素,因此浏览器不会在鼠标悬停时显示它们,请参阅我的工作 演示 .

However, you can use <span> elements that work as links, so the browser don't show them on hover, see my working demo.

这篇关于隐藏状态栏上的锚点显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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