HTMLAreaElement: thuộc tính href
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 href của giao diện HTMLAreaElement là một stringifier trả về chuỗi chứa toàn bộ URL và cho phép cập nhật href.
Giá trị
Một chuỗi.
Ví dụ
js
// A <area id="myArea" href="https://mdn.go-mizu.dev/en-US/HTMLAreaElement"> element is in the document
const area = document.getElementById("myArea");
area.href; // returns 'https://mdn.go-mizu.dev/en-US/HTMLAreaElement'
Đặc tả kỹ thuật
| Specification |
|---|
| HTML> # dom-hyperlink-href-dev> |
Tương thích trình duyệt
Xem thêm
- Giao diện
HTMLAreaElementmà nó thuộc về.