blob: 8e0355d9422c7c0cf7cfde3f9a79ab066a5679a5 [file] [log] [blame]
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Testing click events</title>
<script type="text/javascript">
function displayEvent(event) {
var keys = ['x', 'y', 'clientX', 'clientY', 'pageX', 'pageY', 'screenX', 'screenY', 'shiftKey', 'ctrlKey'];
var message = "<ul>";
for (var i = 0; i < keys.length; i++) {
message += "<li>" + keys[i] + ": <span id='" + keys[i] + "'>" + event[keys[i]] + "</span></li>";
}
message += "</ul>";
document.getElementById('result').innerHTML = message;
}
</script>
</head>
<body>
<div id="eventish" onclick="displayEvent(event);">
Click me to view my coordinates
</div>
<div id="result" style="width:300;height:60">
<p>&nbsp;</p>
</div>
</body>
</html>