网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth (包括边线的宽);网页可见区域高: document.body.offsetHeight...
分类:
Web程序 时间:
2015-01-15 15:34:30
阅读次数:
152
背景:在项目中使用百度地图APIjavascript库InfoBox时,发现代码:/**
*得到infobox的高度跟宽度
*@returnnone
*/
_getInfoBoxSize:function(){
this._boxWidth=parseInt(this._div.offsetWidth,10);
this._boxHeight=parseInt(this._div.offsetHeight,10);
},获得的this._boxH..
分类:
Web程序 时间:
2015-01-14 18:30:30
阅读次数:
217
scrollHeight: 获取对象的滚动高度。scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对象的滚动宽度offsetHeight:获取对象相对于版面或由...
分类:
Web程序 时间:
2015-01-13 13:53:37
阅读次数:
136
网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth (包括边线的宽)网页可见区域高:document.body.offsetHeight (包括边线的...
分类:
Web程序 时间:
2015-01-09 17:11:17
阅读次数:
148
無標題文件
window.onload=function(){
document.getElementById("left").style.height = document.getElementById("right").offsetHeight+"px";
}
我是導航,我很短
我是內容,我很長
我是內容,我很長
...
分类:
其他好文 时间:
2015-01-08 18:02:11
阅读次数:
183
假设 obj 为某个 HTML 控件。offsetTop、offsetLeftobj.offsetTop 指 obj 相对于版面或由 offsetParent 属性指定的父坐标的计算上侧位置,整型,单位像素。具体算法请参见 offsetTop、offsetLeft 算法。obj.offsetLeft...
分类:
其他好文 时间:
2015-01-07 16:39:46
阅读次数:
115
网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth (包括边线的宽);网页可见区域高: document.body.offsetHeight...
分类:
Web程序 时间:
2015-01-07 14:30:16
阅读次数:
146
网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽:document.body.offsetWidth(包括边线的宽);网页可见区域高:document.body.offsetHeight(包括...
分类:
其他好文 时间:
2015-01-07 01:50:31
阅读次数:
116
所有元素产生偏移一的参照物是文档(浏览器的左上角)会产生偏移量的属性:标准流(就是盒子上下排列),float,margin,position的absolute或rellative定位是在margin外面开始定位的offsetLeft/offsetTop 左偏移和上偏移offsetHeight...
分类:
其他好文 时间:
2015-01-06 22:57:47
阅读次数:
186
scrollHeight: 获取对象的滚动高度。scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对象的滚动宽度offsetHeight:获取对象相对于版面或由...
分类:
Web程序 时间:
2015-01-06 11:33:21
阅读次数:
144