为什么链接标题没有在IE中显示但在Firefox中显示?

时间:2009-12-24 05:37:49

标签: internet-explorer firefox xhtml

请参阅此处示例http://jsbin.com/elesa

 <p>
  <a target="_blank" href="#" title="Download PDF, 58KB, opens in a new window">
  <img width="150" height="50" border="0" src="http://sstatic.net/so/img/logo.png" alt=""/>
  </a>
  </p>

1 个答案:

答案 0 :(得分:2)

浏览器以不同的方式优先考虑titlealt。获得正确结果的最安全方法是在图像的titlealt标记上提供相同的标题。例如:

<a target="_blank" href="#" title="Download PDF, 58KB, opens in a new window">
  <img width="150" height="50" border="0" src="http://sstatic.net/so/img/logo.png" 
       alt="Download PDF, 58KB, opens in a new window"/>
</a>