Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Javascript Screen Object

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 178
    Comment on it

    This Object return all the information related to the browser screen . Like width of a screen , height of a screen , color Depth and pixel depth etc .
    Syntax :

    window.screen
    

    Some important property of screen :
    1) width : It return the width of a browser screen .
    2) height : It return the height of a browser screen .
    3) availWidth : It return the available width of a browser screen .
    4) availHeight : It return the available height of a browser screen .
    5) colorDepth : It return the color depth of a browser screen .
    6) pixelDepth : It return the pixel depth of a browser screen .
    Example :
    Script code :

    document.write ( screen.width ) ; // Output : ex. 1366 , it return value based on your browser
    document.write ( screen.height ) ; Output : ex. 768 , it return value based on your browser
    document.write ( screen.availWidth ) ; Output : ex. 1366 , it return value based on your browser
    document.write ( screen.availHeight ) ; Output : ex. 728 , it return value based on your browser
    document.write ( screen.colorDepth ) ; Output : ex. 24 , it return value based on your browser
    document.write ( screen.pixelDepth ) ; Output : ex. 24 , it return value based on your browser
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: