<!DOCTYPE html>
<html lang="en-US">
<body>
<button onclick="myFunction()">Open Window</button>
<p id="point"></p>
<script>
var x = document.getElementById("point");
function myFunction() {
var myWindow = window.open("", "myWindow", "width=400,height=300");
myWindow.document.write("<p>This is 'myWindow'</p>");
myWindow.opener.x.innerHTML = "<p>Window is opened!</p>";
}
</script> </body>
</html>