- How to get window screen size in JavaScript?
- How to set window size in js?
- How to get the viewport width in Javascript?
How to get window screen size in JavaScript?
Use window. innerWidth and window. innerHeight to get the current screen size of a page.
How to set window size in js?
The resizeTo() method resizes a window to a new width and height.
How to get the viewport width in Javascript?
You can use the window. innerHeight property to get the viewport height, and the window. innerWidth to get its width.