鼠标悬停时IE 8“alt”标签不会渲染?

时间:2012-05-08 19:11:25

标签: html internet-explorer internet-explorer-8

确定。我有一个fieldset菜单。如果我硬编码alt的最后一项:

<td>
                        <a href="show.hotpartslist?clearFilters=true">
                            <img class="icon" title="Clear All Filters" alt="Clear All Filters" src="../images/clear_all.gif"/>
                        </a>
                    </td>

但是这个是用一些逻辑构建的,它呈现如下:

<td>
                        <ul id="hp-sor-menu" style="display:none;"><li><img alt="Filter by Source of Repair" src="../images/sor.gif" /><ul><li><a href="show.hotpartslist?sor=ALL">&#8594;&nbsp;&nbsp;ALL</a></li><li><a href="show.hotpartslist?sor=A">&nbsp;&nbsp;&nbsp;MCA</a></li><li><a href="show.hotpartslist?sor=B">&nbsp;&nbsp;&nbsp;MCB</a></li><li><a href="show.hotpartslist?sor=E">&nbsp;&nbsp;&nbsp;BIC</a></li><li><a href="show.hotpartslist?sor=O">&nbsp;&nbsp;&nbsp;OTHER</a></li></ul></li></ul><script type="text/javascript"> 
$(function()
{
    try
    {

        DynarchMenu.setup('hp-sor-menu', {  });

    }
    catch(exception)
    {
        alert("Failed to render other menu: " + exception.description);
    }
});

当mosueover

时,alt不会显示

2 个答案:

答案 0 :(得分:4)

它的title属性导致鼠标悬停效果。您没有填充该属性。

答案 1 :(得分:0)

您需要为title设置mouseover属性以显示工具提示。 alt标记仅用于在图片未加载时显示文字,尽管SEO公司经常加入该标记以使网页排名更好。