zoukankan      html  css  js  c++  java
  • 当浏览器窗口大小改变时事件

    <script type="text/javascript">  

                window.onload=function(){  

                     changeDivHeight();  

                }  

        //当浏览器窗口大小改变时,设置显示内容的高度  

                window.onresize=function(){  

                     changeDivHeight();  

                }  

        function changeDivHeight(){               

          var h = document.documentElement.clientHeight;//获取页面可见高度  

                    document.getElementById("div_ov_y").style.height=h-140+"px";  

        }

    <script>

  • 相关阅读:
    指数
    汉诺塔问题
    只用递归和当前的栈实现栈的逆序
    让你996的不是你的老板,而是其他愿意996的人
    luke towan
    2020-9-3
    2020-9-3
    springboot注解
    2020-9-2
    20200827
  • 原文地址:https://www.cnblogs.com/sese/p/4759077.html
Copyright © 2011-2022 走看看