JavaScript New Window Program
<!DOCTYPE html>
<html>
<head>
<title>New Window</title>
<script>
var newWindow;
function openWindow() {
newWindow = window.open("", "newWindow", "width=500,height=600");
newWindow.document.write("<center><h1>Welcome...</h1>");
newWindow.document.write("<h3>This is The New Window</h3></center>");
}
</script>
</head>
<body>
<center>
<a href="javascript:void(0);" onClick="openWindow()">Click here to open the New Window</a><br><br>
<button onclick="newWindow.close()">Close New Window</button>
</center>
</body>
</html>
Create a free account to keep reading this post.
and 3 others joined a min ago.