<html>
<body>
<p>Click the button to find out if the window on the right side (the result side) is in an iframe. If so, change its URL to "w3schools.com".</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var frame = window.frameElement;
if (frame) {
frame.src = "../index.html";
}
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_frameelement by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:42 GMT -->
</html>