Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get user screen's height and width using Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 266
    Comment on it

    Hello Reader's if you are making the user screen compatible website then you must get the screen hight and width of user. By using Javascript you can easily get it. Lets see how to get screen size.

    <!DOCTYPE html>
    <html>
    <body>
    <script>
    document.getElementById("demo").innerHTML = 
    "Screen height is " + screen.height;
    document.getElementById("demo").innerHTML =
    "Available Screen Width: " + screen.availWidth;
    </script>
    </body>
    </html>
    

    Output:-

    Screen height is 768
    Screen height is 1366
    

 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: