“复制快捷方式”并不总是在Internet Explorer中工作

时间:2013-09-17 21:59:52

标签: html internet-explorer

为什么当我右键单击并选择“复制快捷方式”时,我页面上的某些超链接(A标签)始终无效,但同一页面上的其他超链接工作正常?这不会发生在Chrome或Firefox中,只能在Internet Explorer中发生。

一个有效的例子:

<a id="ctl00_PlaceHolderLeftNavBar_PlaceHolderQuickLaunchBottom_idNavLinkViewAll" accesskey="3" class="ms-core-listMenu-item ms-core-listMenu-heading" href="/_layouts/15/viewlsts.aspx"><span class="ms-splinkbutton-text">Site Contents</span></a>

没有:

<a class="static menu-item ms-core-listMenu-item ms-displayInline ms-navedit-linkNode" href="/">
    <span class="popover-trigger"></span>
    <div class="popover fade right in" style="display: none;">
        <div class="arrow"></div>
        <h3 class="popover-title"></h3>
        <div class="popover-content">
            <div>
                <div class="close pull-right" type="button">×</div>
                <div>123456789-123487123kljhsdvfs09324r5h ol gdfsdlkjhq4309igfsd lkh24350-9ujhgdfs lkhfgiousdlkhdgfs09234 lhdsg0-94235r lkhjsdgf lkjsd g0349gjhfdkl.</div>
                <br>
                <div>
                    <h2>What goes in here:</h2>
                    <ul  style="list-style-type: disc;margin-left: 20px;">
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <span class="additional-background ms-navedit-flyoutArrow"><span class="menu-item-text">Click here</span></span>
</a>

1 个答案:

答案 0 :(得分:2)

这似乎是Internet Explorer中的一个错误。如果超链接包含超过255个字符(隐藏或不隐藏),则不会发生任何事情。见这个例子:

<a href="255-Characters">255 characters - 8901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</a>

<a href="256-Characters">256 characters - 89012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456</a>