I have the following code snippet that displays a series of images and I would like to capture the coordinates of each mouse click on these images. Is there a way to send these coordinates to my email at the end of the image loop? Any assistance in achieving this functionality would be greatly appreciated.
Below is the script I'm currently using:
<head>
<title>Practice2</title>
<link type="text/css" rel="Stylesheet" href="MemStyle.CSS">
<script type = "text/javascript">
var x=0;
function changeImage()
{
if (x == images.length){
return;
}
document.getElementById("img").src=images[x]
x++;
}
var images = ["S2b.jpg", "S3b.jpg", "S4b.jpg", "S5b.jpg", "S1b.jpg"];
</script>
</head>
<body>
<div id="MemImg">
<button onclick="changeImage()" >
<img id="img" width="700px" height="700px" >
</button>
</div>
</body>