Online to see a lot of pictures to follow the mouse movement, the sense of code is very complex, not compatible, in fact, can be very simple to achieve:
<!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=gb2312"><title>Picture following mouse</title></Head><Body><Scripttype= "Text/javascript"> functionDomousemove (e) {varevt=e||window.event; varx=Evt.clentx||Evt.x; vary=Evt.clenty||Evt.y; LayerName= 'IIT'; varcurelement=document.getElementById ("Myimg"); CurElement.style.left=x+"px"; CurElement.style.top=y+"px"; } document.onmousemove=Domousemove;</Script> <DivID= "Mydiv"> <imgID= "Myimg"src= "Img/a2.jpg"STYLE= "Position:absolute; top:0pt; left:0pt;width=103;height=28; Z-index:2; "> </Div></Body></HTML>
At present Document.layers has been dead, look forward to document.all early on the West!!
Picture follows mouse movement (Lite cross browser implementation)