Window Screen
The window.screen object can be written without the window prefix.
Some properties:
screen.availWidth - available screen width
screen.availHeight - available screen height
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <script> document.write("可用宽度: " + screen.availWidth); </script> </body> </html>The screen.availHeight property returns the height of the visitor's screen, in pixels, minus interface features such as the window taskbar.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> </head> <body> <script> document.write("可用宽度: " + screen.availHeight); </script> </body> </html>