What is availWidth Property in JavaScript



Use the screen.availWidth property to return the width of the user’s screen. The result will be in pixels and the Taskbar feature won’t be included.

Example

You can try to run the following code to learn how to work with the screen.availWidth property in JavaScript −

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <script>
         document.write("Width of the user’s screen: "+screen.availWidth);
      </script>
   </body>
</html>
Updated on: 2020-06-23T07:54:22+05:30

88 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements