JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="addr" />
<input type="button" value="Go" onclick="change();" />
<iframe id="browse" style="width:100%;height:100%"></iframe>

JavaScript

function change(){
    document.getElementById("browse").src = document.getElementById("addr").value;
    document.getElementById("browse").onload = function (e){alert(e);}
}