js里获取html真实舞台宽高

    var winSize = {width:document.documentElement.clientWidth,height:document.documentElement.clientHeight};

 

 var winWidth = 0;
 var winHeight = 0;

    window.onload = function(){
        console.log("onload...");

        winWidth = document.documentElement.clientWidth;
        winHeight = document.documentElement.clientHeight;

    }

 

posted @ 2018-12-19 16:49  居家懒人  阅读(285)  评论(0编辑  收藏  举报