HTML DOM
The rel property of the HTMLFormElement interface reflects the rel attribute. It is a string containing what kinds of links the HTML form element creates, as a space-separated list of enumerated values.
To retrieve the value as an array of tokens, use HTMLFormElement.relList.
Value
A string.
Examples
const form = document.querySelector("form");
console.log(form.rel);
form.rel = "noopener noreferrer";
Specifications
Browser compatibility
See also
- HTMLFormElement.relList
- HTMLLinkElement.rel
- HTMLAnchorElement.rel
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
