好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

这里为什么无法获取宽高_html/css_WEB-ITnose

www.style.width=document.body.offsetWidth;
www.style.height=document.body.offsetHeight;
断点以上两行

document.body.offsetWidth
document.body.offsetHeight
都有确定的值
但就是没法赋给width 和 height

 #www{	background-color:#0F0;}  function fun(){	var www=document.getElementById('www')	;	www.style.width=document.body.offsetWidth;	www.style.height=document.body.offsetHeight;	www.style.opacity=0.5;}   

哇哈哈

查看更多关于这里为什么无法获取宽高_html/css_WEB-ITnose的详细内容...

  阅读:32次