Common view properties of the screen object
The screen object is basically used only to indicate the capabilities of the client, including information about the display outside the browser window, such as pixel height and width. The screen object in each browser contains different properties. This article describes the common view properties of screen objects in detail.
Width
The width attribute represents the pixel width of the screen
Height
The height property indicates the pixel height of the screen
/ / chrome:1080 1920//IE/firefox/safari:864 1536console.log (screen.height,screen.width)
AvaiWidth
The availWidth attribute indicates the available width of the monitor, the pixel width of the screen minus the width of system parts such as the taskbar
AvailHeight
The availHeight attribute indicates the available height of the monitor, the pixel height of the screen minus the height of system components such as the taskbar.
/ / chrome:1030 (1080-50) 1920//IE/firefox/safari:824 (864-40) 1536console.log (screen.availHeight,screen.availWidth)