Следите за новинками
в нашем Telegram канале. Жми, чтобы подписаться:)
⊗jsSpMECS 16 of 294 menu
◀ ▶

Client element size in JavaScript

The following properties contain the client element size, which includes the size of the content and padding, and doesn't include the scrollbar:

console.log(elem.clientWidth); // a width console.log(elem.clientHeight); // a height

These dimensions are indicated in the figure:

Given an element and a button. When the button is clicked, print the client width and height of the element to the console.

← →
↑
English▼
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline