Title alt function can display pictures

Source: Internet
Author: User
Enable the title alt function to display images

 

<HTML>
<Head>
<Script language = "JavaScript">
VaR tiptimer;
Function locateobject (n, d) {// V3.0
VaR P, I, X; If (! D) d = document; if (P = n. indexof ("? ")> 0 & parent. frames. Length ){
D=parent.frames[n.substring(p%1%].doc ument; n = n. substring (0, P );}
If (! (X = d [N]) & D. All) x = D. All [N]; for (I = 0 ;! X & I <D. Forms. length; I ++) x = D. Forms [I] [N];
For (I = 0 ;! X & D. Layers & I <D. layers. length; I ++) x=locateobject(n,d.layers+ I }.doc ument); Return X;
}

Function hidetooltip (object)
{
If (document. All)
{
Locateobject (object). style. Visibility = "hidden"
Locateobject (object). style. Left = 1;
Locateobject (object). style. Top = 1;
Return false
}
Else if (document. layers)
{
Locateobject (object). Visibility = "hide"
Locateobject (object). Left = 1;
Locateobject (object). Top = 1;
Return false
}
Else
Return true
}

Function showtooltip (object, E, tipcontent, backcolor, bordercolor, textcolor, displaytime)
{
Window. cleartimeout (tiptimer)

If (document. All)
{
Locateobject (object). style. Top = Document. Body. scrolltop + event. clienty + 20

Locateobject (object ). innerhtml = '<Table Style = "font-family: verdana, tahoma, Arial, Helvetica, sans-serif; font-size: 11px; Border:' + bordercolor + '; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+ backcolor +' "width =" 10 "border =" 0 "cellspacing =" 1 "cellpadding =" 1 "> <tr> <TD nowrap> <font style =" font -Family: verdana, tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+ textcolor +' "> '+ Unescape (tipcontent) + '</font> </TD> </tr> </table>'

If (E. x + locateobject (object). clientwidth)> (document. Body. clientwidth + document. Body. scrollleft ))
{
Locateobject (object). style. Left = (document. Body. clientwidth + document. Body. scrollleft)-locateobject (object). clientWidth-10;
}
Else
{
LocateObject (object). style. left = document. body. scrollLeft + event. clientX
}
LocateObject (object). style. visibility = "visible"
TipTimer = window. setTimeout ("hideTooltip ('" + object + "')", displaytime );
Return true;
}
Else if (document. layers)
{
LocateObject(object).doc ument. write ('<table width = "10" border = "0" cellspacing = "1" cellpadding = "1"> <tr bgcolor = "' + bordercolor + '"> <td> <table width = "10" border = "0" cellspacing = "0" cellpadding = "2"> <tr bgcolor = "'+ backcolor +'"> <td nowrap> <font style = "font-family: verdana, Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+ textcolor +' "> '+ unescape (tipContent) + '</font> </td> </tr> </table> ')
LocateObject(object).doc ument. close ()
LocateObject (object). top = e. y + 20

If (E. x + locateobject (object). Clip. width)> (window. pagexoffset + window. innerwidth ))
{
Locateobject (object). Left = Window. innerwidth-locateobject (object). Clip. Width-10;
}
Else
{
Locateobject (object). Left = E. X;
}
Locateobject (object). Visibility = "show"
Tiptimer = Window. setTimeout ("hidetooltip ('" + Object + "')", displaytime );
Return true;
}
Else
{
Return true;
}
}
</SCRIPT>
</Head>
<Body>
<Div id = "dhtmltooltip" style = "position: absolute; visibility: hidden; width: 10; Height: 10; Z-index: 1000; left: 0; top: 0 "> </div>
<Span onMouseOver = "showTooltip ('dhtmltooltip ', event, 'text tip information' <br> Jimbor Studio ', '# fffff2 ', '#000000', '#000000', '123') "onMouseOut =" hidetooetooltip ('dhtmltooltip ') "> click here </span>
</Body>
<Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.