The original Published time: 2009-05-17--from my Baidu article [imported by moving tools]
Source code: HTTP://WWW.XMASPX.COM/SERVICES/FILEATTACHMENT.ASHX?ATTACHMENTID=43
<title> smile proud of the heart of the Baidu space </title>
<script type= "Text/javascript" >
Window.onerror=new Function ("return true");
if (document.all)
{
document.write ("<div id=tip style= ' Position:absolute; width:210px; Z-index:1;
Background-color: #7D84B9; border:1px solid Gray; overflow:visible;visibility:hidden;font-
Size:12px;padding:12px;color: #ffffff ' ></div> ')
}
Else
{
if (document.layers)
{
document.write ("<layer id=tip visibility= ' hide ' bgcolor= ' #7D84B9 ' ></layer>")
}
Else
{
document.write ("<div id=tip style= ' Position:absolute; width:230px; Z-index:1;
Background-color: #7D84B9; border:1px solid Gray; overflow:visible;visibility:hidden;font-
Size:12px;padding:12px;color: #ffffff ' ></div> ')
}
}
var posx=0;
var posy=0;
Document.onmousemove = MouseMove;
function MouseMove (EV) {
EV = EV | | window.event;
var mousepos = mousecoords (EV);
Posx = mousepos.x;
Posy = Mousepos.y;
}
function Mousecoords (EV) {
if (Ev.pagex | | ev.pagey) {
return {x:ev.pagex, y:ev.pagey};
}
return {
X:ev.clientx + Document.body.scrollleft-document.body.clientleft,
Y:ev.clienty + document.body.scrolltop-document.body.clienttop
};
}
Document.onmousedown = MouseDown;
function MouseDown (EV) {
EV = EV | | window.event;
var target = Ev.target | | Ev.srcelement;
if (Target.onmousedown | | target.getattribute (' dragobj ')) {
return false;
}
}
function Showalt (w) {
if (w== "") return;
var dv = document.getElementById ("Tip");
Dv.innerhtml=w + "<br>";
if (document.all)
{
dv.style.visibility= "visible";
dv.style.left=posx+10; Event.x+10+document.body.scrollleft;
dv.style.pixeltop=posy+10; Event.y+10+document.body.scrolltop;
}
Else
{
if (document.layers)
{
Dv.visibility= "Show";
dv.left=posx+10;
dv.top=posy+10;
}
Else
{
dv.style.visibility= "visible";
Dv.style.left= posx+10;
Dv.style.top= posy+10;
}
}
}
function Hidealt () {
var dv = document.getElementById ("Tip");
Dv.style.innerhtml= ""
if (document.all)
{
Dv.style.visibility= "hidden";
}
Else
{
if (document.layers)
{
Dv.visibility= "Hide";
}
Else
{
Dv.style.visibility= "hidden";
}
}
}
</script>
<body>
<a href = "Http://hi.baidu.com/handboy" onmousemove= ' Showalt ("Click to enter my Baidu space
<br/>http://hi.baidu.com/handboy ") ' onmouseout= ' Hidealt () ' > Smile proud of the heart of the Baidu space </a></p>
</body>
ToolTip effect JavaScript steal the special effects of Xiamen talent Network