I’ve been working on a new project that involves adding links. To do this, users can input both the link URL and the text they want displayed. I used a prompt to gather this information. Here’s the code snippet I wrote:
document.getElementById(ev.target.id).innerHTML = y + "<a href=" + linkurl + " > + linktext + </a>";
However, when I implement the code, the link appears as: + linktext +
.
Is there a way for me to have the link text display the text that was prompted?