如何获得页面坐标? [英] How to get page co-ordinate?

查看:97
本文介绍了如何获得页面坐标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


点击gridview中的按钮后如何获取页面坐标?



i想要找出来其中一个元素(按钮)在页面上。也就是说,找到实际位置,所以如果调整页面大小,它指向元素的正确新位置。









谢谢..

hi
how to get the page coordinate when click on a button in gridview?

i want to find out where an element(button) is on the page.that is, finds the real position, so if resize the page it points to the correct new position of the element.




Thanks..

推荐答案

使用下面提到的代码JavaScript中的点击事件处理程序



window.event.clientY

window.event.clientX
Use below mentioned code inside your click event handler in JavaScript

window.event.clientY
window.event.clientX


这篇关于如何获得页面坐标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆