<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 <script>
 function test(){
    //var huoqu=document.getElementById("huoqu");
    huoqu.innerText="x="+event.clientX+"y="+event.clientY;//clien是针对当前窗口
    huoqu2.innerText="x="+event.screenX+"y="+event.screenY;//clien是针对当前屏幕
    }
 </script>
 </HEAD>

 <BODY>
  <div onmousemove="test()" style="width:400px;height:300px;border:1px red solid">
  </div>
  <span ></span><br/>
  <span ></span>
 </BODY>
</HTML>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2021-07-14
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案