const outputElem = document.getElementById("result");
for (const id of outputElem.htmlFor) {
const elem = document.getElementById(id);
elem.style.outline = "2px solid red";
}HTMLOutputElement: htmlFor property / notebook
HTMLOutputElement: htmlFor property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.