摘要: 用Javascript获取指定页面元素的位置是一个非常常见的需求,本文介绍的函数能够准确返回一个元素相对于整个文档左上角的坐标,即元素的top、left的位置,而且能够兼容浏览器,相信对新手非常有用。function getElementPos(elementId) {var ua = navigator.userAgent.toLowerCase();var isOpera = (ua.inde... 阅读全文
posted @ 2010-10-21 13:39 Hellen.Li 阅读(470) 评论(0) 推荐(0) 编辑
摘要: <span style="border: 1px solid #666666; overflow: hidden;width:12px; height:12px"><input type="checkbox" name="checkbox" value="" style="position: absolute; margin: -5px" /></span> 阅读全文
posted @ 2010-10-21 10:41 Hellen.Li 阅读(470) 评论(0) 推荐(0) 编辑
摘要: <iframe id="mainFrame" src="searchaddr.asp" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0" onload="this.height=mainFrame.document.body.scrollHeight"></iframe> 阅读全文
posted @ 2010-10-21 10:02 Hellen.Li 阅读(158) 评论(0) 推荐(0) 编辑