问题10:获取当前页面宽度JS

it2022-05-11  60

var mleft=document.getElementById("mleft"); var h = document.documentElement.clientHeight; mleft.style.height=h-68+"px";

 

水平滚动条:<div style="width:100px;overflow-x:auto"></div> 垂直滚动条:<div style="height:300px;overflow-y:auto"></div> 水平加垂直:<div style="width:100px;height:300px;overflow-x:auto;overflow-y:auto"></div>

 

转载于:https://www.cnblogs.com/wuss/p/9082752.html


最新回复(0)