Area target Property
Example
Change the target for a specific area in an image-map:
document.getElementById("venus").target = "_blank";
Try it Yourself »
Description
The target property sets or returns the value of the target attribute of an area.
The target attribute specifies where to open the linked document.
Browser Support
Property | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the target property:
areaObject.target
Set the target property:
areaObject.target = "_blank|_self|_parent|_top|framename"
Value | Description |
---|---|
_blank | Open the linked document in a new window |
_self | Open the linked document in the same frame as it was clicked (this is default) |
_parent | Open the linked document in the parent frameset |
_top | Open the linked document in the full body of the window |
framename | Open the linked document in a named frame |
Technical Details
Return Value: | A String, representing where to open the linked document |
---|
More Examples
Example
Get the target of a specific area in an image-map:
var x =
document.getElementById("venus").target;
Try it Yourself »
Related Pages
HTML reference: HTML <area> target attribute
❮ Area Object