Quote Originariamente inviata da techno Visualizza il messaggio
cosi scrivendo mi da errore come posso inserire sia l'attributo href che target sulla stessa riga?
Perché non suddividere banalmente le cose su diverse righe?

codice:
const el = document.querySelector(".mydiv");
const a = document.createElement("a");
a.setAttribute("href", "...");
a.setAttribute("target", "_Black");
el.appendChild(a);

Ciao!