HTMLIFrameElement: thuộc tính height

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Thuộc tính height của giao diện HTMLIFrameElement trả về một chuỗi phản ánh thuộc tính height của phần tử <iframe>, cho biết chiều cao của khung theo pixel CSS.

Giá trị

Một chuỗi cho biết chiều cao của khung theo pixel CSS.

Ví dụ

html
<iframe id="el" width="800" height="600"></iframe>
js
const el = document.getElementById("el");
console.log(el.height); // Output: '600'

Đặc tả kỹ thuật

Specification
HTML
# dom-dim-height

Tương thích trình duyệt

Xem thêm