block by steveharoz 96a6d342d2369028af44793ef3f69bbb

click location

Full Screen

index.html

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>PAGE TITLE</title>
  <style>
    img { 
      border: 2px solid black;
      cursor: crosshair;
    }
  </style>
</head>

<body>
    <h1>Click the image</h1>
    <img 
      src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Chicago_Cubs_Logo.svg/476px-Chicago_Cubs_Logo.svg.png" 
      width="300" 
      onclick="
        var outputString = 'X:' + event.offsetX + ' Y:' + event.offsetY;
        document.getElementById('location_text').textContent = outputString;"
    />
    <p id="location_text"></p>
</body>
</html>