<!DOCTYPE html>
<html>
<body>

<p><b>Note:</b> We have used the <b>top</b> element instead of the <b>window</b> element, because we use frames. If you do not use frames, use the <b>window</b> element instead.</p>
<p>This example works only in Internet Explorer and Safari.</p>

<button onclick="resizeWin()">Resize window</button>

<script>
function resizeWin() {
    top.resizeBy(100, 100);
}
</script>

</body>
</html>