Press "Enter" to skip to content

Screen Examples in JavaScript

Definition :

    It is an object of java script which is meant for retrieving the dimensions of the screen.

Program :

<html>

   <head>

      <script language=”javascript”>

                     function display()

                                 {

                                 document.write(screen.height+”</br>”);

                                 document.write(screen.width+”</br>”);

                                 document.write(screen.availheight+”</br>”);

                                 document.write(screen.availwidth+”</br>”);

                                 }

                  </script>

                </head>

                <body>

                   <input type=”button” value=”get Data” onclick=”display()”/> </br>

                </body>

</html>

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *