Skip to content

Instantly share code, notes, and snippets.

@kangax
Created August 28, 2010 05:41
Show Gist options
  • Save kangax/554777 to your computer and use it in GitHub Desktop.
Save kangax/554777 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="testee">foo</div>
<script type="text/javascript">
document.getElementById('testee').oncontextmenu = function(e) {
alert('e.clientX: ' + e.clientX + '; e.clientY: ' + e.clientY +
'e.pageX: ' + e.pageX + '; e.pageY: ' + e.pageY);
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment