you just need paste this code on .aspx page you will find the your cursor position in browser....
1. ASPX PAGE CODE:-
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Mouse or Cursor Position on the web page using JQuery in Asp .Net</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
$(document).mousemove(function(e) {
$('#lblAxistxt').html("X Axis: "+e.pageX+"<br/>"+ "Y Axis: "+e.pageY);
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<label id="lblAxistxt" style="background-color:Aqua;" />
</div>
</form>
</body>
</html>
DEMO
No comments:
Post a Comment