摘要: HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解scrollHeight: 获取对象的滚动高度。scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对象的滚动宽度offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度offsetLeft:获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置offse 阅读全文
posted @ 2013-10-20 21:41 stevejson 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.iframe父页面修改iframe中的页面的信息 var obj = document.getElementById("iframeId").contentWindow; //获取iframe中的页面的Window对象 $(obj.document).find(":checkbox").length; //获取iframe中的页面里的checkbox数量2.iframe中的页面修改父页面内容 window.top.window.document.getElementById(newId).innerHTML=‘此处内容已被子页面修改。’3.嵌套框架的 阅读全文
posted @ 2013-10-20 21:39 stevejson 阅读(387) 评论(0) 推荐(0) 编辑
摘要: function reinitIframe() { var iframe = document.getElementById("infoIframe"); try { var bHeight = iframe.contentWindow.document.body.scrollHeight; var dHeight = iframe.contentWindow.document.documentElement.scrollHeight; var height =... 阅读全文
posted @ 2013-10-20 21:23 stevejson 阅读(227) 评论(0) 推荐(0) 编辑
摘要: function findPosition(oElement) { var x2 = 0; var y2 = 0; var width = oElement.offsetWidth; var height = oElement.offsetHeight; if (typeof (oElement.offsetParent) != 'undefined') { for (var posX = 0, posY = 0; oElement; oElement =... 阅读全文
posted @ 2013-10-20 20:26 stevejson 阅读(1776) 评论(0) 推荐(0) 编辑