摘要: getBoundingClientRect来获取页面元素的位置详细见:http://www.cnblogs.com/qieqing/archive/2008/10/06/1304399.html//获取页面元素的位置 function getElemPos(obj) { if (obj.getBoundingClientRect) { // 当浏览器支持getBoundingClientRect方法时采用 var pos = obj.getBoundingClientRect(); return { x: pos.left + Math.max(document.documentElement 阅读全文
posted @ 2011-12-30 17:27 前端咖 阅读(401) 评论(0) 推荐(0) 编辑