Return the base target for all links on a page:
The result of x will be:
The target property sets or returns the value of the target attribute in a base element.
The target attribute specifies the default target for all hyperlinks and forms in the page.
The target property is supported in all major browsers.
Return the target property:
Set the target property:
Value | Description |
---|---|
_blank | Open links in a new window |
_self | Open links in the same frame as it was clicked (this is default) |
_parent | Open links in the parent frameset |
_top | Open links in the full body of the window |
framename | Open links in a named frame |
Return Value: | A String, representing the default target for all hyperlinks and forms in the page |
---|
Change the base target for all links on a page to "_blank":
HTML reference: HTML <base> target attribute