screen screen object
Width: The width of the screen, read-only property.
Height: The height of the screen, read-only property.
availWidth: The effective width of the screen, excluding the taskbar. Read-only property.
availHeight: The effective height of the screen, excluding the taskbar. Read-only property.
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script type="text/javascript"> //获取自己屏幕的分辨率 var str="<h2>屏幕的尺寸</h2>"; str += "宽度:"+screen.width+",高度:"+screen.height; str += "<br>有效宽度:"+screen.availWidth+",有效高度:"+screen.availHeight; document.write(str); </script> </head> <body > </body> </html>