JSFiddle - React, Tailwind, and code Playground
by shubh0602
HTML
eg: <br/>Success Case :- http://www.w3schools.com/ <br/> Failure Case :- http://www.google.com <br/>
<input type="text" id="addr" />
<input type="button" value="Go" onclick="change();" />
<iframe id="browse" style="width:100%;height:100%" onload="load" onerror="error"></iframe>
<iframe id="browse1" style="width:100%;height:100%" onload="alert('Done')" onerror="alert('Failed')"></iframe>
JavaScript
function change(){
var url=$("#addr").val();
$("#browse").attr("src",url);
$("#browse1").attr("src",url);
}
function load(e){
alert(e);
}
function error(e){
alert('error '+e);
}