<!DOCTYPE html>
<html>
<head>





<script type="text/javascript">
function ResizeBrowserBy() {
window.resizeBy(-50, -50);
}
function ResizeBrowserTo() {
window.resizeTo(600, 400);
}
</script>
</head>
<body>
<button onclick="ResizeBrowserBy();">Make the browser window smaller!</button>
<br />
<button onclick="ResizeBrowserTo();">Resize the browser window to 600px * 400px</button>
</body>


</html>

http://jsbin.com/ezojoz/1/edit