<html>
<body>
<h1>The Window Object</h1>
<h2>The focus() Method</h2>
<p>Click the button to open a new window, and set focus to it.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
const myWindow = window.open("", "", "width=200,height=100");
myWindow.focus();
}
</script>
</body>
</html>