在IE8中打印具有@href内容内联 [英] Printing in IE8 Has @href contents inline

查看:117
本文介绍了在IE8中打印具有@href内容内联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能告诉我如何阻止IE8打印文本旁边的A标签的href值。例如,此标记

Can someone tell me how to stop IE8 printing the value of the href for an A tag next to the text. For example this markup

<a href="/site/page.html">Some Link</a>

打印出来时

Some Link(/site/page.html)

打印时。我怎么能阻止这个?

when printed. How can I stop this?

推荐答案

在IE8中我不会发生这种情况,我从未发现它。我也无法在任何地方的Internet选项中找到它。

This doesn't happen for me in IE8 and I've never spotted it. I also can't find it in the Internet Options anywhere.

您的计算机上可能有一些软件可以执行此操作,例如AVG Anti-Virus添加内容到网页,告诉您已检查显示的链接是否存在潜在有害内容 - 因此您的系统安全软件可能会扩展所有链接以显示实际指向的位置,以防止网络钓鱼攻击。

It is possible that you have some software on your computer that does this, for example AVG Anti-Virus adds content to web pages to tell you that it has checked the links being displayed for potentially harmful content - so your system-security software may be expanding all links to show you where they actually point, to prevent phishing attacks.

如果你的机器上有一些防网络钓鱼软件,你必须在其中找到该选项。

If you do have some anti-phishing software on your machine, you'll have to find the option within that.

更新 - 几乎可以肯定是一些聪明的CSS。

我创建了以下测试页面来演示如何使用CSS将URL添加到链接生成的内容。如果在打印样式表中使用它,则可以解释在打印页面时如何将URL添加到链接中。要停止此操作,您必须保存网页副本,从仅打印样式表中删除样式规则,然后打开副本并打印出来!

I have created the following test page to demonstrate how you can add the URL to a link using CSS generated content. If this was used within a print stylesheet, this would explain how the URL is getting added to the link when you are printing the page. To stop this, you would have to save a copy of the web page, remove the style rule from the print-only style sheet and then open your copy and print it!

<html>
<head>
<title>Test</title>
    <style type="text/css">
    a:after {
        content: " [" attr(href) "] ";
    }
    </style>
</head>
<body>
    <h1>Test</h1>
    <p>This is a test to see if this 
    <a href="http://www.stevefenton.co.uk/">Link Shows A URL</a></p>
</body>
</html>

这篇关于在IE8中打印具有@href内容内联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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