Please login to start chat

ICT Solutions 25 Jun 2022, 11:38:30
Category : JavaScript Tutorials

moveTo (HTML DOM Window)

<!DOCTYPE html>
<html>
<head>
<title>Js Code Testing</title>
</head>
<body>
<button onclick = "openWin()">Open Window</button>
<button onclick = "moveWin()">Move Window</button>
<script>
function openWin(){
myWindow = window.open('', 'myWindow', 'width=300px, height=200px');
myWindow.document.write('hello');
myWindow.document.designMode = "On";
}

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

Comments:

No comment to show.

Available Services
Download Android Application