HTMLEmbedElement: thuộc tính width
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 width của giao diện HTMLEmbedElement trả về một chuỗi phản ánh thuộc tính width của phần tử <embed>, cho biết chiều rộng hiển thị của tài nguyên tính bằng pixel CSS.
Giá trị
Một chuỗi cho biết chiều rộng hiển thị của tài nguyên tính bằng pixel CSS.
Ví dụ
html
<embed id="el" width="800" height="600" src="https://example.com" />
js
const el = document.getElementById("el");
console.log(el.width); // Kết quả: '800'
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| HTML> # dom-dim-width> |