IE10中的鼠标坐标问题 [英] mouse coordinate problem in IE10
本文介绍了IE10中的鼠标坐标问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<!DOCTYPE>
< html>
< head>
< title> clientX属性样本< / title>
< script type =" text / javascript">
function clientCoords(){
var clientInfo =""
clientInfo =" x坐标是:" + window.event.clientX +" \r"
clientInfo + =" y坐标是:" + window.event.clientY +" \r"
alert(clientInfo);
}
< / script>
< / head>
<! - TOOLBAR_START - >
<! - TOOLBAR_EXEMPT - >
<! - TOOLBAR_END - >
< body onbeforeunload =" clientCoords()">
< div class =" body">
< h1> clientX属性样本< / h1>
< h1>请点击以下链接< / h1>
< a class =" copyright" HREF =" HTTP://www.microsoft.com/isapi/gomscom.asp TARGET = /信息/ cpyright.htm">
©2007 Microsoft Corporation。版权所有。使用条款。< / a>
<! - END_PAGE_FOOTER - >< / div>
< / body>
< / html>
我们使用上面的代码来获取鼠标坐标。它工作得很好IE8,IE9(某些版本),但在最新的Windows更新后,它始终给予X和Y位置相同。我们需要这些坐标来检查浏览器是否已关闭并执行一些操作
如清除ASP.NET中的会话
我们正在使用IE10版本:10.0.9200.16635
发布复制步骤
1)请点击页面中的链接
谢谢
Srikanth
解决方案
我认为这是安全更新的问题
KB2846071
谢谢
<!DOCTYPE> <html> <head> <title>clientX Property Sample</title> <script type="text/javascript"> function clientCoords() { var clientInfo = "" clientInfo = "The x coordinate is: " + window.event.clientX + "\r" clientInfo += "The y coordinate is: " + window.event.clientY + "\r" alert(clientInfo); } </script> </head> <!--TOOLBAR_START--> <!--TOOLBAR_EXEMPT--> <!--TOOLBAR_END--> <body onbeforeunload="clientCoords()"> <div class="body"> <h1>clientX Property Sample</h1> <h1>Please Click on below link</h1> <a class="copyright" href="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm"> © 2007 Microsoft Corporation. All rights reserved. Terms of use.</a> <!-- END_PAGE_FOOTER --></div> </body> </html>
we are using above code to get mouse coordinates . it is working fine IE8,IE9(some versions) but after latest windows update it is always giving X and Y Positions are same. we need these coordinates to check browser is closed and doing some operations like clear the sessions in ASP.NET
We are using IE10 Version :10.0.9200.16635
issue replication steps
1) please click link in the page
Thanks
Srikanth
解决方案
i think this is the problem of security update
KB2846071
Thanks
这篇关于IE10中的鼠标坐标问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文