取document.body的告诉的怪异问题,clientHeight,scrollHeigh等都一样,而且都不正确 当文档加载完成后你再去获取. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是文档加载完获取的啊加载完显示出按钮,点按钮的时候获取的 <script>_getpos = function(e){ var o={get:true}; o.id=e.getAttribute&&e.getAttribute("id") o.t=parseInt((e.style?e.style.top:0)||e.offsetTop||e.clientTop||0);// o.l=parseInt((e.style?e.style.left:0)||e.offsetLeft||e.clientLeft||0);// o.w=parseInt(e.offsetWidth||e.clientWidth);//(e.style?e.style.width:0)|| o.h=parseInt(e.offsetHeight||e.clientHeight);//(e.style?e.style.height:0)|| o.sh=parseInt(e.scrollHeight||o.h); o.p=e.style?e.style.position:null; return o; } alert(_getpos(document.body).sh);</script>试试这个 请问:一个JSP页面中如何调用多个RSS源(导入JS写的XMLHTTP每次只能读1个RSS) 求大神帮我解释的js里面run函数的意思。。。 用过DevExpress控件的帮下忙了哈 Jquery 截取缩放图片问题 为什么js幻灯脚本在子目录和Firefox中无法显示?(100分) setInterval延伸题 怎样通过鼠标移动将<td>里面的图片切换??? 一个关于窗口自动关闭的问题,请指点。 怎样将运行的网页隐藏起来?请说得明白点 明天就要交活了,还差一个功能没有实现,高手们帮忙呀!!!!!!! 请高手看看这段JS代码,有关释放内存的问题。。。。。。 想请教大家一个关于选中文字的问题。
_getpos = function(e){
var o={get:true};
o.id=e.getAttribute&&e.getAttribute("id")
o.t=parseInt((e.style?e.style.top:0)||e.offsetTop||e.clientTop||0);//
o.l=parseInt((e.style?e.style.left:0)||e.offsetLeft||e.clientLeft||0);//
o.w=parseInt(e.offsetWidth||e.clientWidth);//(e.style?e.style.width:0)||
o.h=parseInt(e.offsetHeight||e.clientHeight);//(e.style?e.style.height:0)||
o.sh=parseInt(e.scrollHeight||o.h);
o.p=e.style?e.style.position:null;
return o;
}
alert(_getpos(document.body).sh);
</script>
试试这个