Browser size (width and height)

后端 未结 5 2249
我寻月下人不归
我寻月下人不归 2020-12-08 04:14

I\'m trying to detect the browser\'s current size (width and height). I know it\'s super easy in jQuery with $(document).width and $(document).height, but I don

5条回答
  •  遥遥无期
    2020-12-08 05:09

    Here is a code sample

    function getSize(){
    
    var w=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    
    var h=window.innerHeight || document.documentElement.clientHeight ||document.body.clientHeight;
    
    
    }
    

提交回复
热议问题