This article describes the JavaScript implementation of the simple tip box effect. Share to everyone for your reference, specific as follows:
JavaScript Document
document.write ("<div id= ' tip ' style= ' position:absolute; width:300px; Z-index:1; Background-color: #ffffff; border:1px solid Gray; Overflow:visible;visibility:hidden;font-size:12px;padding:12px;color: #333333 ' ></div> ')
function Showtip (w) {
var x=event.x;
var Y=event.y;
Tip.innerhtml=w;
tip.style.visibility= "visible";
tip.style.left=x+10;
tip.style.pixeltop=y+document.body.scrolltop+10;
}
function Hidetip () {
tip.style.innerhtml= ""
tip.style.visibility= "hidden";
}
Save As: Showtip.js
<table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" background= "#F7F7F0" >
<tr height= "25" >
<td background= "images/line-dot.gif" height= "align=" left ">
<a
onmousemove=" Showtip (' <b> title:</b><br> graduate student self-confidence more in the packaging outside <BR > ') "
onmouseout=hidetip ()
href= ' common/newsdetails.aspx?id=1035 '
target=_blank>
graduated girls Self-confidence more in the packaging outside
</a>
</td>
</tr>
<tr>
<td background= "Images/point_ H.gif "height=" 1 "></td>
</tr>
</table>
More readers interested in JavaScript-related content can view the site topics: "JavaScript switching effects and tips summary", "JavaScript Search Algorithm Skills Summary", "JavaScript animation effects and tips summary", " JavaScript error and debugging skills Summary, JavaScript data structure and algorithm skills summary, JavaScript traversal algorithm and skills summary and JavaScript mathematical calculation usage Summary
I hope this article will help you with JavaScript programming.