JSFiddle - React, Tailwind, and code Playground

by wmmead

HTML

<a href="#" id="link">Click here </a>

<div id="empty"></div>

JavaScript

document.getElementById("link").onclick = runPrompt;

function runPrompt()
{
    var promptContent = prompt("how are you", "");
    document.getElementById("empty").innerHTML = "Here is what you typed... " + promptContent;
}