Đối tượng vùng HTML DOM
Đối tượng khu vực
Đối tượng Area đại diện cho phần tử HTML <area>.
Truy cập một đối tượng khu vực
Bạn có thể truy cập phần tử <area> bằng cách sử dụng getElementById():
Tạo một đối tượng khu vực
Bạn có thể tạo phần tử <area> bằng cách sử dụng phương thức document.createElement():
Thuộc tính đối tượng khu vực
Property | Description |
---|---|
alt | Sets or returns the value of the alt attribute of an area |
coords | Sets or returns the value of the coords attribute of an area |
hash | Sets or returns the anchor part of the href attribute value |
host | Sets or returns the hostname and port part of the href attribute value |
hostname | Sets or returns the hostname part of the href attribute value |
href | Sets or returns the value of the href attribute of an area |
noHref | Not supported in HTML5. Sets or returns the value of the nohref attribute of an area |
origin | Returns the protocol, hostname and port part of the href attribute value |
password | Sets or returns the password part of the href attribute value |
pathname | Sets or returns the pathname part of the href attribute value |
port | Sets or returns the port part of the href attribute value |
protocol | Sets or returns the protocol part of the href attribute value |
search | Sets or returns the querystring part of the href attribute value |
shape | Sets or returns the value of the shape attribute of an area |
target | Sets or returns the value of the target attribute of an area |
username | Sets or returns the username part of the href attribute value |
Thuộc tính và sự kiện tiêu chuẩn
Đối tượng Area cũng hỗ trợ các thuộc tính và sự kiện tiêu chuẩn.
Trang liên quan
Tham chiếu HTML: Thẻ HTML <area>