マウスについてくるイメージ | MENU |
<HTML lang="ja"> <HEAD> <TITLE>マウスについてくるイメージ</TITLE> <STYLE type=text/css> <!-- .mouse { position:absolute; } //--> </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var img="img/bat2.gif"; function newPos(e){ document.getElementById('Mouse').style.left=e.clientX + window.pageXOffset; document.getElementById('Mouse').style.top=e.clientY + window.pageYOffset; } document.write("<div id='Mouse' class='mouse'>"); document.write("<img class='mouse' src='"+img+"' id='Mouse' name='Mouse'></div>"); document.onmousemove = newPos; // --> </SCRIPT> </head> <body bgcolor="#eeeedd" text="#000000"> </body> </html>