๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Lect & Tip/javascript, jQuery

โœˆ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ onresize ์ด๋ฒคํŠธ ์ฐฝํฌ๊ธฐ ๋ณ€๊ฒฝ ๊ฐ์ง€

by ๋‚ฏ์„ ๊ณต๊ฐ„2019 2019. 7. 4.

๋ชฉ์ฐจ

    ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ onresize ์ด๋ฒคํŠธ ์ฐฝํฌ๊ธฐ ๋ณ€๊ฒฝ ๊ฐ์ง€

    ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ onresize ์ด๋ฒคํŠธ

    ์ฐฝ์˜ ํฌ๊ธฐ๊ฐ€ ๋ณ€๊ฒฝ๋  ๋•Œ๋งˆ๋‹ค ๊ทธ ๊ฒƒ(์ด๋ฒคํŠธ)์„ ๊ฐ์ง€ํ•ด์„œ ํŠน์ • ์ฒ˜๋ฆฌ๋ฅผ ํ•ด์•ผ ๋  ๋•Œ ๋Š˜ onresize ์ด๋ฒคํŠธ๋ฅผ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

     

     

    Syntax

    HTML Attribute

    <element onresize = "handler(event)">

    Event Property

    object.onresize = handler;

    attachEvent Method

    object.attachEvent("onresize", handler)

    http://msdn.microsoft.com/en-us/library/ms536959(VS.85).aspx

    onresize ์ด๋ฒคํŠธ๋ฅผ ์ ์šฉ๊ฐ€๋Šฅํ•œ ์—˜๋ ˆ๋ฉ˜ํŠธ๋Š” window ๊ฐ์ฒด ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค์Œ์˜ ๊ฐ์ฒด๋“ค์—๋„ ์ ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

     A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, CUSTOM, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, FRAME, hn, HR, I, IMG, INPUT type=button, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, window, XMP

    window.onresize = function() { ํ•จ์ˆ˜๋ช…(); // ๋˜๋Š” ๊ตฌ๋ฌธ }

     

     

    ๋ฐ˜์‘ํ˜•

    ๋Œ“๊ธ€