<html>
<head>
<script type="text/javascript">
function resizeWindow()
{
top.resizeTo(500,300)
}
</script>
</head>
<body>
<form>
<input type="button" onclick="resizeWindow()" value="Resize window">
</form>
<p><b>Note:</b> We have used the <b>top</b> element instead of the <b>window</b> element, to represent the top frame. If you do not use frames, use the <b>window</b> element instead.</p>
</body>
</html>