W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function cursor(event) { document.getElementById('trail').style.visibility="visible" document.getElementById('trail').style.position="absolute" document.getElementById('trail').style.left=event.clientX+10 document.getElementById('trail').style.top=event.clientY } </script> </head> <body onmousemove="cursor(event)"> <h1>请在页面上移动指针</h1> <img id="trail" style="visibility:hidden" src="/i/eg_w3school.gif" /> </body> </html>