How to get user screen size in JS

Опубликовано: 10 Январь 2023
на канале: Shrideep ghag
137
8

You can get the physical screen size of a user device in javascript.
The screen interface represents the user device screen where the current window is rendered using window.screen.
You can use window.screen.height and window.screen.width to get the user screen height and width.
However, on-screen there is some permanent or semi-permanent user interface displayed by OS, such as a taskbar in the windows, so to get the height and width excluding it you can use screen.availHeight and screen.availWidth.

-------------------------
linkedIn -   / shrideep-ghag  
twitter -   / shrideepghag  
youtube -    / @shrideepghag  
--------------------------
#shorts #interviewquestions #interview #javascript #js #cs #webapp #screensize #screen #physical #device
--------------------------
Video editor: clipchamp
Voice: Neerja


Смотрите видео How to get user screen size in JS онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Shrideep ghag 10 Январь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 137 раз и оно понравилось 8 людям.