开发者

Get specific elements of a website displayed in firefox

I use a screenshot tool like SnagIt and this tool is able to make a screenshot of a specific element inside a website. I tried this feature with firefox, safari and ie, all runs fine. When I use the mouse pointer to aim an element, SnagIt shows a red box around the hovered element in the browser. For example, this tool knows the exact coordinates of a div or img element.

What is the technique behind this feature? Is there a common way for every browser? I've already used Spy++ to get the window handles, unfortunately 开发者_运维知识库this isn't the resolution.

I'm in a project in which I need this feature for different browsers.

Thank you very much, Mark


If you want to know the x,y coordinates of any element in javascript, Then I suggest you use jquery [http://jquery.com] on your page and use its offset function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜