resizeBy() 예제
<button onclick="openWin()">window 열기</button> <button onclick="resizeWin()">window 크기변경</button> <script> var hzWin; function openWin() { hzWin = window.open("", "", "width=100, height=100"); hzWin.document.write("<p>홈짱닷컴 Homzzang.com</p>"); } function resizeWin() { hzWin.resizeBy(250, 250); hzWin.focus(); } </script> 결과보기
<button onclick="openWin()">window 열기</button>
<button onclick="resizeWin()">window 크기변경</button>
<script>
var hzWin;
function openWin() {
hzWin = window.open("", "", "width=100, height=100");
hzWin.document.write("<p>홈짱닷컴 Homzzang.com</p>");
}
function resizeWin() {
hzWin.resizeBy(250, 250);
hzWin.focus();
</script>
결과보기
※ resizeWin 버튼 클릭할수록 창크기가 점점 커짐.