jQuery can be used to get the dimensions of the current page. The dimensions include the screen, viewport and document height, and width.
- Getting the window dimensions: Window size is the size of the browser window. This is the size that changes when the browser is resized. The windows height and width can be accessed with the height() and width() method after selecting the window object.
- Getting the document dimensions: Document size is the size of the HTML document. The documents height and width can be accessed with the height() and width() method after selecting the document object.
- Getting the screen dimensions: Screen size is the total size of the user’s screen. The screen’s height and width can be accessed with the height and width property.
- Before clicking the button:
- After clicking the button:
- How to get title of current HTML page using jQuery ?
- How to jump to top of browser page using jQuery?
- Difference between Web Browser and Web Server
- Web 1.0, Web 2.0 and Web 3.0 with their difference
- Web Window API | Window locationbar property
- Web Window API | Window scrollbars property
- Web Window API | DOM Window fullscreen property
- Web Window API | Window personalbar property
- Web Window API | Window statusbar property
- Web Window API | Window toolbar property
- Web Window API | Window menubar property
- How to give a div tag 100% height of the browser window using CSS
- How to open a PDF files in web browser using PHP?
- Python | Program to crawl a web page and get most frequent words
- Get the current URL using jQuery?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.