ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` <div id="areaXY" style="width: 300px;height:200px;background-color: aquamarine;border:5px solid darkred; margin: 25px;"> 300*200 </div> <div id="info" style="width: 300px;height:40px;background-color: aquamarine;border:5px solid darkred; margin: 25px;"> </div> <script type="text/javascript"> window.onload=function(){ var info=document.getElementById("info"); var areaXY=document.getElementById("areaXY"); areaXY.onmousemove=function(event){ //IE8及以下事件响应函数被触发时不会传递event对象,而是作为window的属性保存 if(!event){ event=window.event; } var X=event.clientX; var Y=event.clientY; var sX=event.screenX; var sY=event.screenY; info.innerHTML="x:"+X+"&nbsp;&nbsp;&nbsp;&nbsp;y:"+Y; info.innerHTML+="screenX:"+sX+"&nbsp;&nbsp;&nbsp;&nbsp;screenX:"+sY; } } </script> ```