<html> <head> <script type="text/javascript"> function resizeWindow(){ window.resizeTo(500,300) } </script> </head> <body> <form> <input type="button" onclick="resizeWindow()" value="Resize window"> </form> </body> </html>