Aryan PrajapatKnowledge Contributor
What do you mean by screen objects? Explain.
What do you mean by screen objects? Explain.
Sign Up to our social questions and Answers Engine to ask questions, answer peopleâs questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer peopleâs questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
The screen object is a built-in interface that is used to get the information about the browser screen on which the current webpage is displayed. It provides information about the dimensions of the rendered screen such as screen width, height, colorDepth, pixelDepth, etc.
Property of JavaScript screen object that returns information of the browser:
1.width: returns the width of the screen
2.height: returns the height of the screen
3.availWidth: returns the available width excluding windows taskbar
4.availHeight: returns the available height excluding windows taskbar
5.colorDepth: returns the color depth of color palette, in bits, to render images
6.pixelDepth: returns the color resolution in bits per pixel of the screen.
For example:
document.write(â
The display screen width is: â+screen.width);
document.write(â
The display screen height is: â+screen.height);
document.write(â
The display screen available width is: â+screen.availWidth);
document.write(â
The display screen available height is: â+screen.availHeight);
document.write(â
The display screen color depth is: â+screen.colorDepth);
document.write(â
The display screen pixel depth is: â+screen.pixelDepth);