function runCode() { const code = document.getElementById("editor").value; document.getElementById("preview").srcdoc = code; } function clearCode() { document.getElementById("editor").value = ""; document.getElementById("preview").srcdoc = ""; }
Hosted & Compiled with
HtmlRunner.com