Edit This Code:
<!DOCTYPE html>
<html>
<head>
<script>
var myWindow;
function openWin() {
    myWindow=window.open("", "", "width=400, height=200");
}

function moveWin() {
    myWindow.moveTo(300, 0);
    myWindow.focus();
}
</script>
</head>
<body>

<input type="button" value="Open myWindow" onclick="openWin()" />
<br><br>
<input type="button" value="Move myWindow" onclick="moveWin()" />

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy