开发者

How to add image tag inside title attribute of an anchor tag?

I have added an img tag inside title attribut开发者_开发百科e,but the img tag shows as text when hover over link(using hovertip js),and does not display an image.What needs to be done?

<a title="4r23r 2342.00 &lt;img src=/m/productsmedia/IHALE.GIF&gt;" class="product_detail " href="/?product=6" id="0">4r23r</a>


You cannot! You need to use custom tooltip look-a-like effect with IMG insdie DIV and on mouseHover event.

Here is an example.


This is not possible in HTML, at least not what you appear to be attempting.

If you want a clickable image, you put the img tag inside the a tag, not inside an attribute:

<a title="4r23r 2342.00" class="product_detail " href="/?product=6" id="0">
 <img src="/m/productsmedia/IHALE.GIF" />
</a>

If you want a tooltip that contains an image, you need to code it using javascript and css. There are plenty of articles describing how to achieve this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜