HTML DOM
The target property of the HTMLBaseElement interface is a string that represents the default target tab to show the resulting output for hyperlinks and form elements.
It reflects the target attribute of the base element.
Value
A string representing the target. Its value can be:
- The name of a frame.
- One of the keyword with specific values:
_blank,_self,_parent, or_top.
Example
<head>
<base target="_top" />
</head>
const baseElement = document.getElementsByTagName("base")[0];
console.log(baseElement.target); // Output: '_top'
Specifications
Browser compatibility
See also
- HTMLAnchorElement.target property
- HTMLAreaElement.target property
- HTMLFormElement.target property
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
