Window screen.availWidth ɗanɗan

Definition and usage

availWidth Property returns the width of the user's screen.

availWidth Property returns the width in pixels.

availWidth Property returns the width minus the width of the Windows taskbar and other interface functions.

availWidth Properties are read-only.

Tip:To get the height of the screen, use availHeight property.

Instance

Example 1

Get the available width of the screen:

let width = screen.availWidth;

Try it yourself

Example 2

All screen properties:

let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>"
"Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>"
"Color depth: " + screen.colorDepth + "<br>"
"Color resolution: " + screen.pixelDepth;

Try it yourself

Syntax

screen.availWidth

Return value

Type Description
Number Width of user screen (in pixels).

Browser tukuri

All browsers tukuri screen.availWith:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Tukuri Tukuri Tukuri Tukuri Tukuri Tukuri

Safinai da yana kai

HTML DOM Kita cece:screen.availHeight gari

HTML DOM Kita cece:screen.availWidth gari

HTML DOM Kita cece:screen.height gari

HTML DOM Kita cece:screen.width 属性