<html>
<body>
<iframe id="myframe" src="../default.html"></iframe>
<p>Click the button to change the src attribute in the iframe.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myframe").src = "http://www.cnn.com/";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_iframe_src2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:40:41 GMT -->
</html>