1

为什么当我右键单击并选择“复制快捷方式”时,我页面上的某些超链接(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>
4

1 回答 1

2

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

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

<a href="256-Characters">256 characters - 89012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456</a>
于 2013-09-17T21:59:52.317 回答