HTML DOM Area Object
Area Object
The Area object represents the HTML <area> element.
Access Area Object
You can access the <area> element using getElementById():
var x = document.getElementById("myArea");
Create Area Object
You can create the <area> element using the document.createElement() method:
var x = document.createElement("AREA");
Area Object Properties
Properties | Description |
---|---|
alt | Set or return the alt attribute value of the area. |
coords | Set or return the coords attribute value of the area. |
hash | Set or return the anchor part of the href attribute value. |
host | Set or return the hostname and port parts of the href attribute value. |
hostname | Set or return the hostname part of the href attribute value. |
href | Set or return the href attribute value of the area. |
noHref |
Not supported in HTML5. Set or return the nohref attribute value of the area. |
origin | Return the protocol, hostname, and port parts of the href attribute value. |
password | Set or return the password part of the href attribute value. |
pathname | Set or return the pathname part of the href attribute value. |
port | Set or return the port part of the href attribute value. |
protocol | Set or return the protocol part of the href attribute value. |
search | Set or return the query string part of the href attribute value. |
shape | Set or return the shape attribute value of the area. |
target | Set or return the target attribute value of the area. |
username | Set or return the username part of the href attribute value. |
Standard properties and events
The Area object supports both standardPropertiesandEvents.
Related Pages
HTML Reference Manual:HTML <area> Tag