how to get x coordinate and y coordinate of the image

asked 2011-07-04 06:52:37 +0800

archana gravatar image archana

on click of image tag,how to get x and y coordinate i.e image possitions of the image

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-07-04 10:53:55 +0800

matthewgo gravatar image matthewgo

updated 2011-07-04 10:57:48 +0800


<div width="300px" height="300px" style="background:blue" onClick='alert(event.x)' />   //or event.pageX 

plz refer getX() & getPageX()


link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-07-04 06:52:37 +0800

Seen: 441 times

Last updated: Jul 04 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More