MathML
The target property of the MathMLAnchorElement interface is a string that indicates where to display the linked resource.
It reflects the target attribute of the <a> element.
Value
A string representing the target. Its value can be one of the keywords _blank, _self, _parent, or _top.
Examples
Basic usage
Given this MathML:
<math>
<a id="myAnchor" href="https://example.com" target="_blank"> ... </a>
</math>
you can get the target of the anchor like this:
const mathAnchor = document.getElementById("myAnchor");
mathAnchor.target; // returns '_blank'
Specifications
Browser compatibility
See also
- The MathML
<a>element
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
