<DOCTYPE html>
<html>
<head>
<title> JavaScript</title>
</head>
<body>
<button onclick="openWindow()">Open Window</button>
<button onclick="resizeTo()">resizeTo</button>
<button onclick="resizeBy()">resizeBy</button>
<script>
var myWindow;
function openWindow()
{
myWindow=window.open("","","width=200px,height=200px,left=30px,top=30px");
myWindow.document.write("<p>This is my window.</p>")
}
function resizeTo()
{
myWindow.resizeTo(400,400);
}
function resizeBy()
{
myWindow.resizeBy(400,400);
}
</script>
</body>
</html>
OUTPUT
Comments
Post a Comment