标签:char pre var anti bsp element htm 获取 tle
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <script type="text/javascript" src="scripts/jquery.js" ></script> <script type="text/javascript"> $(document).ready(function(){ $("#shiyan").mousemove(function(e){ var eve = e || window.event; document.getElementById("inp").value="X:"+e.screenX+"Y:"+e.screenY document.getElementById("inp1").value="X:"+e.pageX+"Y:"+e.pageY document.getElementById("inp2").value="X:"+e.clientX+"Y:"+e.clientY }); }); </script> <body> <div id="shiyan" style="width: 600px;height: 600px;background: antiquewhite;" > 鼠标在屏幕上的位置<input id="inp" type="text" value="" /><br /> 鼠标在页面上的位置<input id="inp1" type="text" value="" /><br /> 鼠标在页面上可视区域的位置<input id="inp2" type="text" value="" /><br /> </div> </body> </html>
标签:char pre var anti bsp element htm 获取 tle
原文地址:http://www.cnblogs.com/txl401/p/6177902.html