Get the size of the screen, current web page and browser window

前端 未结 19 2432
面向向阳花
面向向阳花 2020-11-21 05:29

How can I get windowWidth, windowHeight, pageWidth, pageHeight, screenWidth, screenHeight,

19条回答
  •  面向向阳花
    2020-11-21 06:13

    This how I managed to get the screen width in React JS Project:

    If width is equal to 1680 then return 570 else return 200

    var screenWidth = window.screen.availWidth;
    
    
    

    Screen.availWidth

提交回复
热议问题