<html>
<body>
<iframe id="myFrame" srcdoc="<p>Hello world!</p>" src="demo_iframe.htm"></iframe>
<p>Click the button to change the HTML content that is shown in the iframe.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myFrame").srcdoc = "<p>Some new content inside the iframe!</p>";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_iframe_srcdoc2 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:46:34 GMT -->
</html>