Add special effects to hyperlinks by moving the mouse to display the prompt and move with the mouse

  • 2020-03-26 21:29:38
  • OfStack

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<title> New Document </title> 
</head> 
<script> 
var c$={}; 
var w$=function(s){document.write(s);} 
var o$=function(id){return document.getElementById(id);} 
w$("<div id="ts" style="position:absolute;background-color:#FFFFE6;font-size: 12px;padding: 3px; border: 1px solid #FFCC99;display:none"></div>"); 

c$.mmove=function(o,s){ 
//alert(typeof(s)); 
var evt=event||window.event; 
var x=evt.clientX+5; 
var y=evt.clientY+20; 
o$("ts").style.left=x+"px"; 
o$("ts").style.top=y+"px"; 
if(s==""||typeof(s)=="undefined"){ 
o$("ts").innerHTML=o.innerHTML; 
}else{ 
o$("ts").innerHTML=s 
} 
o$("ts").style.display=""; 
} 
c$.mout=function(){ 
o$("ts").style.display="none"; 
} 
</script> 
<body> 
<a href="#" onmousemove="c$.mmove(this,' Click to view the device error analysis ');" onmouseout="c$.mout();"> 
<span style="color:blue;text-decoration:underline;"> Analysis of the  </span> 
</a> 
</body> 
</html> 


Related articles: