<!DOCTYPE html>
<html lang="en-US">
<body>
<button onclick="myOpen()">Open the Window</button>
<button onclick="myMoveTo()">MoveTo the Window</button>
<button onclick="myMoveBy()">MoveBy the Window</button>
<script>
var myWindow;
function myOpen(){
myWindow = window.open("", "myWindow", "width=400, height=200");
}
function myMoveTo(){
myWindow.moveTo(200, 100);
myWindow.focus();
}
function myMoveBy(){
myWindow.moveBy(40, 40);
myWindow.focus();
}
</script> </body>
</html>