availWidth() and availHeight() property of the Screen Object in javascript

availHeight property is used to return the height of the visitor's screen.


<html>
<body>
<script type="text/javascript">
document.write("The Height of the Screen is: " + screen.availHeight);
</script>
</body>
</html>


availWidth property is used to return the width of the visitor's screen.

<html>
<body>

<script type="text/javascript">

document.write("The Width of the Screen is: " + screen.availWidth);

</script>

</body>
</html>
Ebook Download
View all
Learn
View all