摘要: function getTop(e){var offset=e.offsetTop;if(e.offsetParent!=null) offset+=getTop(e.offsetParent);return offset;}//获取元素的横坐标function getLeft(e){var offset=e.offsetLeft;if(e.offsetParent!=null) offset+=getLeft(e.offsetParent);return offset;}详细出处参考:http://www.jb51.net/article/24348.htm 阅读全文
posted @ 2011-06-30 21:12 Pocter 阅读(115) 评论(0) 推荐(0) 编辑