2012-07-30 72 views
68

我正在使用工具提示。但我希望在图像标签上,就像当我将鼠标悬停在图像上时那么工具提示应该起作用。我已经尝试过,但没有在图像标签上为我工作。图片上的工具提示

+0

什么语言? HTML,C#,Java,...? – Matthias 2012-07-30 07:18:34

+0

php + html + jqyery – user1528786 2012-07-30 07:22:08

+2

使用'document.getElementById('theImage')。title ='tooltip text''。 – Jay 2012-07-30 07:31:40

回答

229

使用图像的标准HTML标题属性?

<img src="source of image" alt="alternative text" title="this will be displayed as a tooltip"/>