使用javascript查找DOM元素的位置 [英] using javascript to find position of DOM elements

查看:88
本文介绍了使用javascript查找DOM元素的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检查网页上元素的空间组织。

I want to inspect spatial organization of elements on a web page.

我可以获得示例代码和指向资源的指针。

Could I get sample code and pointers to resources.

谢谢。

推荐答案

如果你想要好的,模块化的代码,你可以阅读并轻松提取位你想要的,试试David Mark的 MyLibrary (用于构建你的)库)。

If you want good, modular code that you can read and easily extract just the bits you want, try David Mark's MyLibrary (which you use to build your library).

我发现像jQuery这样的库本身错综复杂,依赖于他们自己的功能,试图追踪所有功能并重新映射属性是一种沮丧的运动。另一方面, MyLibrary 从一开始就被编写为非常模块化,并提供更好的跨浏览器功能。

I find libraries like jQuery are so intricately bound up in themselves and dependant on their own functionality that trying to track down all the functions and re-mapping of properties is an exercise in frustration. On the other hand, MyLibrary is written to be very modular from the start and provides better cross-browser features.

这篇关于使用javascript查找DOM元素的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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