HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Base Object : Return the base target for all links on a page
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.
Property | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
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":
document.getElementById("myBase").target = "_blank";
HTML reference: HTML <base> target attribute
❮ Base Object