Ä«½ºÄÉÀ̵ùµÈ °øÅë ½ºÅ¸ÀϽ¬Æ®³ª ÀζóÀÎ ½ºÅ¸ÀϽ¬Æ®, HTML ¼Ó¼ºµéÀÇ Àû¿ëµÇ´Â ÃÖÁ¾ ½ºÅ¸ÀϽ¬Æ®ÀÇ ³»¿ëÀ» ´ëÇ¥ÇÑ´Ù.
Script | [propVal=]..propName; | |
HTML | ¾ø´Ù. |
style °³Ã¼´Â ¼Ó¼ºÀ¸·Î ÀζóÀÎ ½ºÅ¸ÀÏ·Î ÁöÁ¤µÈ ½ºÅ¸ÀÏ ¸¸À» ¹ÝȯÇϴµ¥ ¹ÝÇØ currentStyle °³Ã¼´Â ¿¤·¹¸àÆ®ÀÇ Ä³½ºÄÉÀÌÆ®µÈ ½ºÅ¸ÀÏÀ» ¹ÝȯÇÑ´Ù.
µû¶ó¼ currentStyle °³Ã¼¿Í style °³Ã¼¿¡¼ ¹ÝȯµÇ´Â ½ºÅ¸ÀÏÀº ´Ù¸¦ ¼ö ÀÖ´Ù.
¿¹¸¦µé¾î
color ¼Ó¼ºÀÌ ÀζóÀÎÀÌ ¾Æ´Ï°í ¹®´Ü¿¡ ¿¬°á(linked)À̳ª ½ºÅ¸ÀϽ¬Æ®(stylesheet)¿¡ ÁöÁ¤µÇ¾ú´Ù¸é currentStyle.color ¼Ó¼ºÀº »ö»ó°ªÀ» ¹ÝȯÇÏÁö¸¸ style.color´Â ¹Ýȯ°ªÀÌ ¾ø´Ù.
±×·¯³ª ±× ¹®´Ü¿¡ <P style="color:blue">·Î »ö»óÀÌ ÁöÁ¤µÇ¾ú´Ù¸é currentStyle¿Í style °³Ã¼´Â ¸ðµÎ »ö»ó°ª blue¸¦ ¹ÝȯÇÑ´Ù.
currentStyle °³Ã¼´Â ´ÙÀ½°ú °°Àº ¿ì¼± ¼øÀ§·Î Ä«½ºÄÉÀ̵ùµÈ´Ù.
µû¶ó¼ ½ºÅ¸ÀϽ¬Æ® <B> ű׿¡ normal·Î ÁöÁ¤µÇ¾úÀ¸¸é currentStyle °³Ã¼´Â fontWeight °ªÀ» normal·Î ¹ÝȯÇÒ °ÍÀÌ´Ù.
currentStyle °³Ã¼´Â ¹®¼ÀÇ ¼³Á¤µÈ ½ºÅ¸ÀÏÀÌ Àû¿ëµÈ °ªµéÀ» ¹ÝȯÇÏ°í, °ªÀÌ ¹ÝȯµÈ ½ËÁ¡¿¡¼ Ç¥ÇöµÇ´Â °ªÀ» ¹Ý¿µÇÏÁö ¾ÊÀ» ¼ö ÀÖ´Ù. ¿¹¸¦µé¾î ½ºÅ¸ÀÏ ¼Ó¼º°ª "color:blue; display:none"À» °¡Áø °³Ã¼°¡ ¹®¼»ó¿¡ Ç¥ÇöµÇÁö ¾Ê´õ¶óµµ currentStyle.color¸¦ blue·Î ¹ÝȯÇÏ°í currentStyle °³Ã¼ ³»¿ëÀÇ Ç¥Çö¿¡ ¹Ý¿µµÇÁö ¾Ê´Â´Ù. ½ºÅ¸ÀϽ¬Æ®ÀÇ disabledµµ currentStyle °ª¿¡ ¿µÇâÀ» ÁÖÁö ¾Ê´Â´Ù.
¹Ýȯ°ªÀº ±× °³Ã¼¿¡ ÁöÁ¤µÈ ´ÜÀ§·Î ¹ÝȯÇÑ´Ù. ¿¹¸¦µé¾î °³Ã¼¿¡ ÀζóÀÎ ½ºÅ¸ÀÏ style="color:blue"À¸·Î ÁöÁ¤ÇÏ¿´À¸¸é object.currentStyle.color´Â RGB »ö»ó°ª #0000FF·Î ¹ÝȯÇÏÁö ¾Ê°í blue·Î ¹ÝȯÇÑ´Ù.
currentStyle °³Ã¼´Â ½ºÅ¸ÀÏ ¸í·É(rule) ¼Ó¿¡ »ç¿ëÀÚ Á¤ÀÇ ¼Ó¼ºµéÀ» Áö¿øÇÑ´Ù. ¿¹Á¦ ÂüÁ¶.
currentStyle °³Ã¼´Â ºñµ¿±âÀûÀÌ´Ù. ÀÌ´Â ¼³Á¤ÇÒ ¼ö ¾ø°í ¿ø·¡ÀÇ °ª ´ë½Å Áï½Ã °¡Á®¿Â´Ù´Â ÀǹÌÀÌ´Ù. µû¶ó¼ addImport ¸Þ¼µåµî ½ºÅ©¸³Æ®·Î currentStyleÀ» ¾ò±â À§Çؼ´Â ±× ¸Þ¼µå¸¦ È£ÃâÇÏ°í currentStyle¸¦ °ËÁ¤ÇÏ´Â ±â´ÉÀÌ Æ÷ÇԵǾî¾ß ÇÑ´Ù. ¹®¼°¡ ·ÎµùµÇ´Â µ¿¾È currentStyle¸¦ °ËÁ¤Çϱâ À§Çؼ´Â body ¿¤·¹¸àÆ®°¡ ·ÎµùµÇ°í Ç¥ÇöµÉ ¶§±îÁö ±â´Ù·Á¾ß ÇÑ´Ù. ±× Àü¿¡´Â currentStyle °ªÀÌ ´Ù¸¦ ¼ö ÀÖ´Ù.
IE5 ºÎÅÍ´Â ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
¼³¸íÀ» À§ÇÑ ¿¹Á¦
¿¹Á¦ ¹®ÀÚ¿
|
style | script |
---|---|
{accelerator:val} | obj.style.accelerator[=val] |
¢¡ °³Ã¼°¡ ´ÜÃàÅ°¸¦ °¡Áö°í Àִ°¡¸¦ ºÎ¿ï°ªÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-attachment:val} | obj.style.backgroundAttachment[=val] |
¢¡ ¹®¼ ¼ÓÀÇ ¹è°æ À̹ÌÁö¸¦ °³Ã¼¿¡ ¹è¿ ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-color:val} | obj.style.backgroundColor[=val] |
¢¡ °³Ã¼ÀÇ ¹è°æ¿¡ ±ò¸®´Â »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-image:val} | obj.style.backgroundImage[=val] |
¢¡ °³Ã¼ÀÇ ¹è°æ À̹ÌÁö¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù . | |
{background-position-x:val} | obj.style.backgroundPositionX[=val] |
¢¡ backgroundPosition ¼Ó¼ºÀÇ x ÁÂÇ¥¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-position-y:val} | obj.style.backgroundPositionY[=val] |
¢¡ backgroundPosition ¼Ó¼ºÀÇ y ÁÂÇ¥¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-repeat:val} | obj.style.backgroundRepeat[=val] |
¢¡ °³Ã¼ backgroundImage ¼Ó¼ºÀÇ ¹Ýº¹ ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{behavior:val} | obj.style.behavior[=val] |
¢¡ DHTML behaviorÀÇ ¼Ò°³ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-bottom-color:val} | obj.style.borderBottomColor[=val] |
¢¡ °³Ã¼ÀÇ ¹Ù´Ú Å׵θ®ÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-bottom-style:val} | obj.style.borderBottomStyle[=val] |
¢¡ °³Ã¼ÀÇ ¹Ù´Ú Å׵θ® ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-bottom-width:val} | obj.style.borderBottomWidth[=val] |
¢¡ °³Ã¼ÀÇ ¹Ù´Ú Å׵θ®ÀÇ µÎ²²¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-collapse:val} | obj.style.borderCollapse[=val] |
¢¡ Å×À̺íÀÇ ÁÙÀ̳ª ÄÀÇ Å׵θ®°¡ ¼·Î ÇÕÇØÁö´Â°¡¸¦ ºÐ¸®µÇ´Â°¡ ³ªÅ¸³»´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-color:val} | obj.style.borderColor[=val] |
¢¡ °³Ã¼ÀÇ Å׵θ® »ö»óµéÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-left-color:val} | obj.style.borderLeftColor[=val] |
¢¡ °³Ã¼ ¿ÞÂÊ Å׵θ®ÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-left-style:val} | obj.style.borderLeftStyle[=val] |
¢¡ °³Ã¼ ¿ÞÂÊ Å׵θ®ÀÇ ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-left-width:val} | obj.style.borderLeftWidth[=val] |
¢¡°³Ã¼ ¿ÞÂÊ Å׵θ®ÀÇ µÎ²²¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-right-color:val} | obj.style.borderRightColor[=val] |
¢¡ °³Ã¼ ¿À¸¥ÂÊ Å׵θ®ÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-right-style:val} | obj.style.borderRightStyle[=val] |
¢¡ °³Ã¼ ¿À¸¥ÂÊ Å׵θ®ÀÇ ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-right-width:val} | obj.style.borderRightWidth[=val] |
¢¡ °³Ã¼ ¿À¸¥ÂÊ Å׵θ®ÀÇ µÎ²²¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-top:val} | obj.style.borderTop[=val] |
¢¡ °³Ã¼ À§ÂÊ Å׵θ®ÀÇ ¼Ó¼ºµéÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-top-color:val} | obj.style.borderTopColor[=val] |
{border-top-style:val} | obj.style.borderTopStyle[=val] |
¢¡ °³Ã¼ À§ÂÊ Å׵θ®ÀÇ ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-top-width:val} | obj.style.borderTopWidth[=val] |
¢¡ °³Ã¼ À§ÂÊ Å׵θ®ÀÇ µÎ²²¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{border-width:val} | obj.style.borderWidth[=val] |
¢¡ °³Ã¼ÀÇ À§ÂÊ, ¿À¸¥ÂÊ, ¾Æ·¡ÂÊ, ¿ÞÂÊ Å׵θ®µéÀÇ µÎ²²¸¦ ÀÏ°ýÀûÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{bottom:val} | obj.style.bottom |
¢¡ °³Ã¼ ü°èµµ»ó ¾Æ·¡ÂÊ °³Ã¼¿ÍÀÇ °Å¸®¸¦ ¹ÝȯÇÑ´Ù. | |
{clear:val} | obj.style.clear |
¢¡ °³Ã¼¿¡¼ ºÎµ¿(float)ºÎºÐÀÇ ¸éÀÇ ¿ÞÂÊ, ¿À¸¥ÂÊ È¤Àº ¾çÂÊÀ¸·Î Ç¥ÇöÀÌ Çã¿ëÇϴ°¡¸¦ ¹ÝȯÇÑ´Ù. | |
¾ø½¿ | obj.style.clipLeft |
¢¡ °³Ã¼ÀÇ Àß·ÁÁö´Â ºÎºÐ ¿ÞÂÊ ÁÂÇ¥¸¦ ¹ÝȯÇÑ´Ù. | |
¾ø½¿ | obj.style.clipRight |
¢¡ °³Ã¼ÀÇ Àß·ÁÁö´Â ºÎºÐ ¿À¸¥ÂÊ ÁÂÇ¥¸¦ ¹ÝȯÇÑ´Ù. | |
¾ø½¿ | obj.style.clipTop |
¢¡ °³Ã¼ÀÇ Àß·ÁÁö´Â ºÎºÐ À§ÂÊ ÁÂÇ¥¸¦ ¹ÝȯÇÑ´Ù. | |
{color:val} | obj.style.color |
¢¡ °³Ã¼ÀÇ ±ÛÀÚ »ö»óÀ» ¹ÝȯÇÑ´Ù. | |
{cursor:val} | obj.style.cursor[=val] |
¢¡ °³Ã¼À§¿¡¼ ¸¶¿ì½º Æ÷ÀÎÅÍÀÇ º¸ÀÌ´Â ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{direction:val} | obj.style.direction[=val] |
¢¡ °³Ã¼ÀÇ Àд ¼ø¼¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{display:val} | obj.style.display[=val] |
¢¡ °³Ã¼¸¦ µð½ºÇ÷¹ÀÌÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{font-family:val} | obj.style.fontFamily |
¢¡ »ç¿ëÇÑ ±Û²ÃÀÇ À̸§µéÀ» ¹ÝȯÇÑ´Ù. | |
{font-size:val} | obj.style.fontSize[=val] |
¢¡ °³Ã¼ ÅؽºÆ®¿¡¼ »ç¿ëÇÑ ±Û²ÃÀÇ Å©±â¸¦ ³ªÅ¸³»´Â ¼öÄ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{font-style:val} | obj.style.fontStyle[=val] |
¢¡ °³Ã¼ÀÇ ±Û²Ã ÇüÅÂÀ» italic, normal, obliqueµîÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{font-variant:val} | obj.style.fontVariant[=val] |
¢¡ °³Ã¼ÀÇ ¹®ÀÚ¸¦ ÀÛÀº ´ë¹®ÀÚµé·Î º¯ÇüÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{font-weight:val} | obj.style.fontWeight[=val] |
¢¡ °³Ã¼ÀÇ ±Û²Ã µÎ²²¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.hasLayout |
¢¡ °³Ã¼°¡ ·¹À̾ƿô(layout)À» °¡Áö°í Àִ°¡¸¦ ºÎ¿ï°ªÀ¸·Î ¹ÝȯÇÑ´Ù. | |
{height:val} | obj.style.height |
¢¡ °³Ã¼ÀÇ ³ôÀ̸¦ ¹ÝȯÇÑ´Ù. | |
{ime-mode:val} | obj.style.imeMode[=val] |
¢¡ °³Ã¼ÀÇ ÀÔ·Â ¹æ½Ä ÆíÁý(IME : Input Method Editor)À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{layout-flow:val} | obj.style.layoutFlow |
¢¡ °³Ã¼ ³»¿ëÀÇ ¹æÇâÀ̳ª È帧¹æÇâÀ» ¹ÝȯÇÑ´Ù. | |
{layout-grid-char:val} | obj.style.layoutGridChar[=val] |
¢¡ ¿¤·¹¸àÆ®µï ³»¿ë ¹®ÀÚ¸¦ Ç¥ÇöÇϱâ À§ÇÏ¿© »ç¿ëµÈ ±ÛÀÚ ±×¸®µåÀÇ Å©±â¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{layout-grid-line:val} | obj.style.layoutGridLine[=val] |
¢¡ ¿¤·¹¸àÆ®µï ³»¿ë ¹®ÀÚ¸¦ Ç¥ÇöÇϱâ À§ÇÏ¿© »ç¿ëµÈ ±ÛÀÚ ±×¸®µå ÁÙ °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{layout-grid-mode:val} | obj.style.layoutGridMode[=val] |
¢¡ ÅؽºÆ® ·¹À̾ƿô ±×¸®µå¿¡ °¡·Î, ¼¼·Î°¡ »ç¿ëµÇ¾ú´Â°¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù | |
{layout-grid-type:val} | obj.style.layoutGridType[=val] |
¢¡ ¿¤·¹¸àÆ®µï ³»¿ë ¹®ÀÚ¸¦ Ç¥ÇöÇϱâ À§ÇÏ¿© »ç¿ëµÈ ±×¸®µåÀÇ Á¾·ù¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{left:val} | obj.style.left |
¢¡ °³Ã¼ ü°èµµ»ó ¿ÞÂÊ °³Ã¼¿ÍÀÇ °Å¸®¸¦ ¹ÝȯÇÑ´Ù. | |
{letter-spacing:val} | obj.style.letterSpacing[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ±ÛÀÚµé »çÀÌÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{line-break:val} | obj.style.lineBreak[=val] |
¢¡ ÀϺ»¾î ÅؽºÆ®¿¡¼ ÁÙÀÚ¸§(line-breaking) ¸í·É(rule)À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{line-height:val} | obj.style.lineHeight[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ÁÙ°ú ¾Æ·¡ÁÙ°úÀÇ °Å¸®¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{list-style-image:val} | obj.style.listStyleImage[=val] |
¢¡ °³Ã¼ÀÇ ¸ñ·Ï ½ºÅ¸ÀÏ(listStyle)¿¡ »ç¿ëµÇ´Â À̹ÌÁö ÁÖ¼Ò¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{list-style-position:val} | obj.style.listStylePosition[=val] |
¢¡ °³Ã¼ÀÇ ¸ñ·Ï ½ºÅ¸ÀÏ¿¡ »ç¿ëµÇ´Â Ç׸ñ Ç¥½ÃÀÚÀÇ À§Ä¡¸¦ °³Ã¼ÀÇ ³»¿ë¿¡ »ó´ëÀûÀÎ À§Ä¡·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{list-style-type:val} | obj.style.listStyleType[=val] |
¢¡ °³Ã¼ÀÇ ¸ñ·Ï ½ºÅ¸ÀÏ¿¡ »ç¿ëµÇ´Â Ç׸ñ Ç¥½ÃÀÚÀÇ Á¤ÇØÁø ÇüŸ¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{margin:val} | obj.style.margin[=val] |
¢¡ °³Ã¼ÀÇ À§ÂÊ, ¿À¸¥ÂÊ, ¾Æ·¡ÂÊ, ¿ÞÂÊ ¸¶Áø(ÁÖº¯ °³Ã¼¿ÍÀÇ °£°Ý)µéÀÇ µÎ²²¸¦ ÀÏ°ýÀûÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{margin-bottom:val} | obj.style.marginBottom[=val] |
¢¡ °³Ã¼ÀÇ ¾Æ·¡ÂÊ ¸¶Áø µÎ²²À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{margin-left:val} | obj.style.marginLeft[=val] |
¢¡ °³Ã¼ÀÇ ¿ÞÂÊ ¸¶Áø µÎ²²À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{margin-right:val} | obj.style.marginRight[=val] |
¢¡ °³Ã¼ÀÇ ¿À¸¥ÂÊ ¸¶Áø µÎ²²À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{margin-top:val} | obj.style.marginTop[=val] |
¢¡ °³Ã¼ÀÇ À§ÂÊ ¸¶Áø µÎ²²À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{min-height:val} | [val=]obj.style.minHeight |
¢¡ IE6 °³Ã¼ÀÇ ÃÖ¼Ò ³ôÀ̸¦ ¹ÝȯÇÑ´Ù. | |
{overflow:val} | obj.style.overflow[=val] |
¢¡ °³Ã¼ÀÇ ³»¿ëÀÌ ³ôÀ̳ª ³Êºñ¸¦ ÃÊ°úÇÏ¿´À» ¶§ ¾î¶»°Ô ó¸®ÇÒ °ÍÀΰ¡¸¦ ³ªÅ¸³»´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{overflow-x:val} | obj.style.overflowX[=val] |
¢¡ °³Ã¼ÀÇ ³»¿ëÀÌ ³Êºñ¸¦ ÃÊ°úÇÏ¿´À» ¶§ ±× ³»¿ëÀ» ¾î¶»°Ô ó¸®ÇÒ °ÍÀΰ¡¸¦ ³ªÅ¸´Ï´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{overflow-y:val} | obj.style.overflowY[=val] |
¢¡ °³Ã¼ÀÇ ³»¿ëÀÌ ³ôÀ̸¦ ÃÊ°úÇÏ¿´À» ¶§ ±× ³»¿ëÀ» ¾î¶»°Ô ó¸®ÇÒ °ÍÀΰ¡¸¦ ³ªÅ¸´Ï´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{padding:val} | obj.style.padding[=val] |
¢¡ °³Ã¼µé »çÀÌ, ±×µé¿¡ ¼Ò¼ÓµÈ ¸¶Áø, º¸´õ±îÁöÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{padding-bottom:val} | obj.style.paddingBottom[=val] |
¢¡ °³Ã¼ÀÇ ¾Æ·¡ÂÊ º¸´õ¿Í ³»¿ë »çÀÌÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{padding-left:val} | obj.style.paddingLeft[=val] |
¢¡ °³Ã¼ÀÇ ¿ÞÂÊ º¸´õ¿Í ³»¿ë »çÀÌÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{padding-right:val} | obj.style.paddingRight[=val] |
¢¡ °³Ã¼ÀÇ ¿À¸¥ÂÊ º¸´õ¿Í ³»¿ë »çÀÌÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{padding-top:val} | obj.style.paddingTop[=val] |
¢¡ °³Ã¼ÀÇ À§ÂÊ º¸´õ¿Í ³»¿ë »çÀÌÀÇ °£°ÝÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{page-break-after:val} | [val=]obj.style.pageBreakAfter |
¢¡ °³Ã¼ ´ÙÀ½¿¡ ÆäÀÌÁö ¹Ù²ÞÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇÑ´Ù. | |
{page-break-before:val} | [val=]obj.style.pageBreakBefore |
¢¡ °³Ã¼ Àü¿¡ ÆäÀÌÁö ¹Ù²ÞÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇÑ´Ù. | |
{position:val} | obj.style.position |
¢¡ °³Ã¼ÀÇ À§Ä¡½ÃÅ´ ¹æ½ÄÀ» ¹ÝȯÇÑ´Ù. | |
{right:val} | obj.style.right |
¢¡ °³Ã¼ ü°èµµ»ó ¿À¸¥ÂÊ °³Ã¼¿ÍÀÇ °Å¸®¸¦ ¹ÝȯÇÑ´Ù. | |
{ruby-align:val} | [val=]obj.style.rubyAlign |
¢¡ rt °³Ã¼¿¡ ÁöÁ¤µÈ ·çºñ(ruby) ÅؽºÆ®ÀÇ À§Ä¡¸¦ ¹ÝȯÇÑ´Ù. | |
{ruby-overhang:val} | [val=]obj.style.rubyOverhang |
¢¡ rt °³Ã¼¿¡ ÁöÁ¤µÈ ·çºñ(ruby) ÅؽºÆ®ÀÇ À§Ä¡¸¦ ¹ÝȯÇÑ´Ù. | |
{ruby-position:val} | [val=]obj.style.rubyPosition |
¢¡ rt °³Ã¼¿¡ ÁöÁ¤µÈ ·çºñ(ruby) ÅؽºÆ®ÀÇ À§Ä¡¸¦ ¹ÝȯÇÑ´Ù. | |
{scrollbar-3dlight-color:val} | obj.style.scrollbar3dLightColor[=val] |
¢¡ ½ºÅ©·Ñ ¹Ú½º¿Í ½ºÅ©·Ñ¹Ù È»ìÀÇ À§Âʸé°ú ¿ÞÂʸéÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-arrow-color:val} | obj.style.scrollbarArrowColor[=val] |
¢¡ ½ºÅ©·Ñ¹ÙÀÇ È»ìÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-base-color:val} | [val=]obj.style.scrollbarBaseColor |
¢¡ ½ºÅ©·Ñ¹ÙÀÇ ±âº» »ö»ó(½ºÅ©·Ñ¹Ù, ½ºÅ©·Ñ ¹Ú½º, Æ®·¢, È»ì)À» ¹ÝȯÇÑ´Ù. | |
{scrollbar-darkshadow-color:val} | obj.style.scrollbarDarkShadowColor[=val] |
¢¡ ½ºÅ©·Ñ¹ÙÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-face-color:val} | obj.style.scrollbarFaceColor[=val] |
¢¡ ½ºÅ©·Ñ ¹Ú½º¿Í ½ºÅ©·Ñ¹ÙÀÇ È»ìÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-highlight-color:val} | obj.style.scrollbarHighlightColor[=val] |
¢¡ ½ºÅ©·Ñ ¹Ú½º¿Í ½ºÅ©·Ñ¹Ù È»ìÀÇ À§Âʸé°ú ¿ÞÂʸéÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-shadow-color:val} | obj.style.scrollbarShadowColor[=val] |
¢¡ ½ºÅ©·Ñ ¹Ú½º¿Í ½ºÅ©·Ñ¹Ù È»ìÀÇ ¾Æ·¡Âʸé°ú ¿À¸¥ÂʸéÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{scrollbar-track-color:val} | obj.style.scrollbarTrackColor[=val] |
¢¡ ½ºÅ©·Ñ¹Ù Æ®·¢(track) ¿¤·¹¸àÆ®ÀÇ »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{float:val} | obj.style.styleFloat |
¢¡ °³Ã¼¿¡¼ ¾î´À ¹æÇâÀ¸·Î ÅؽºÆ®°¡ È带 °ÍÀΰ¡¸¦ ¹ÝȯÇÑ´Ù. | |
{table-layout:val} | [val=]obj.style.tableLayout |
¢¡ Å×ÀÌºí ·¹À̾ƿôÀÌ °íÁ¤µÇ¾î Àִ°¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿À» ¹ÝȯÇÑ´Ù. | |
{text-align:val} | [val=]obj.style.textAlign |
¢¡ °³Ã¼ ¼ÓÀÇ ¹®ÀÚ³ª °³Ã¼ÀÇ ¼öÆò Á¤·Ä ¹æ½Ä(left, right, center, justified)À» ¹ÝȯÇÑ´Ù. | |
{text-align-last:val} | [val=]obj.style.textAlignLast |
¢¡ °³Ã¼ ¼ÓÀÇ ¹®ÀÚ³ª °³Ã¼ ¸¶Áö¸· ÁÙÀÇ ¼öÆò Á¤·Ä ¹æ½ÄÀ» ¹ÝȯÇÑ´Ù. | |
{text-autospace:val} | [val=]obj.style.textAutospace |
¢¡ Á¶Á¤µÈ ¹®ÀÚ¸¦ À§ÇÑ ÀÚµ¿ ¹®ÀÚ °£°Ý ¸ÂÃ߱⸦ ¹ÝȯÇÑ´Ù. | |
{text-decoration:val} | [val=]obj.style.textDecoration |
¢¡ °³Ã¼ ¼ÓÀÇ ¹®ÀÚ Àå½Ä(±ô¹Ú°Å¸², Áß°£ÁÙ, ÀÁÙ, ¾Æ·§ÁÙ)À» ¹ÝȯÇÑ´Ù. | |
{text-indent:val} | [val=]obj.style.textIndent |
¢¡ °³Ã¼ ¼Ó¿¡¼ ¹®ÀÚÀÇ Ã¹ ±ÛÀÚ¸¦ µé¾î¾²±â ÇÏ´Â Á¤µµ¸¦ ¹ÝȯÇÑ´Ù. | |
{text-justify:val} | [val=]obj.style.textJustify |
¢¡ °³Ã¼ ¼ÓÀÇ ¹®ÀÚ¿¡ »ç¿ëµÈ Á¤·Ä ¹æ½ÄÀ» ¹ÝȯÇÑ´Ù . | |
{text-kashida-space:val} | [val=]obj.style.textKashidaSpace |
¢¡ °³Ã¼ ¼Ó¿¡¼ ¹®ÀÚ Á¤·Ä ¹æ½ÄÀ» »ç¿ëÇÒ ¶§ °ø¹é Ç¥½Ã¿¡ kashida ºñÀ²À» ¹ÝȯÇÑ´Ù. ¾Æ¶ø¾î¿¡¼ »ç¿ëµÈ´Ù. | |
{text-overflow:val} | [val=]obj.style.textOverflow |
¢¡ IE6 °³Ã¼¿¡¼ ¹®ÀÚÀÇ ³ÑóÈ帧À» Ç¥½ÃÇÏ´Â ¹æ½Ä°ªÀ» ¹ÝȯÇÑ´Ù. | |
{text-transform:val} | obj.style.textTransform[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ¹®ÀÚÀÇ º¯È¯ Ç¥Çö ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{text-underline-position:val} | obj.style.textUnderlinePosition[=val] |
¢¡ °³Ã¼ÀÇ textDecoration ¼Ó¼ºÀÌ 'underline'·Î ¼³Á¤µÈ °æ¿ì ¹ØÁÙÀÇ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{text-transform:val} | obj.style.textTransform[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ¹®ÀÚÀÇ º¯È¯ Ç¥Çö ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{text-underline-position:val} | obj.style.textUnderlinePosition[=val] |
¢¡ °³Ã¼ÀÇ textDecoration ¼Ó¼ºÀÌ 'underline'·Î ¼³Á¤µÈ °æ¿ì ¹ØÁÙÀÇ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{top:val} | [val=]obj.style.top |
¢¡ °³Ã¼ ü°èµµ »ó ¹Ù·ÎÀ§ÀÇ °³Ã¼·ÎºÎÅÍÀÇ °Å¸®¸¦ ¹ÝȯÇÑ´Ù. | |
{unicode-bidi:val} | obj.style.unicodeBidi[=val] |
¢¡ ¾ç¹æÇâ ¾Ë°í¸®Áò¿¡ °üÇÑ ±ò¸° ¼öÁØÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{vertical-align:val} | [val=]obj.style.verticalAlign |
¢¡ °³Ã¼ÀÇ ¼öÁ÷ Á¤·Ä ¹æ½ÄÀ» ¹ÝȯÇÑ´Ù. | |
{visibility:val} | obj.style.visibility[=val] |
¢¡ °³Ã¼ÀÇ ³»¿ëÀÌ µð½ºÇ÷¹ÀÌµÉ °ÍÀΰ¡¸¦¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{white-space:val} | obj.style.whiteSpace[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ±æÀÌ°¡ ±ä ¹®ÀÚ¿ÀÇ ÀÚµ¿ ÁٹٲÞÀ» ºóÄ¿¡¼ ÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{width:val} | obj.style.width[=val] |
¢¡ °³Ã¼ÀÇ ³Êºñ¸¦ ¹ÝȯÇÑ´Ù. | |
{word-break:val} | [val=]obj.style.wordBreak |
¢¡ ´Ü¾î ¼Ó¿¡¼ ÀÚµ¿ ÁٹٲÞÀ» ÇÒ °ÍÀΰ¡¸¦ ¹ÝȯÇÑ´Ù. ƯÈ÷ º¹¼ö ¾ð¾î¸¦ »ç¿ëÇÒ ¶§ Áß¿äÇÑ´Ù. | |
{word-spacing:val} | obj.style.wordSpacing[=val] |
¢¡ °³Ã¼ ¼Ó¿¡¼ ´Ü¾î°£ÀÇ °£°ÝÀ» Áõ°¡½ÃÅ°´Â Á¤µµ¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{word-wrap:val} | obj.style.wordWrap[=val] |
¢¡ ³»¿ëÀÌ ¿ë±â °³Ã¼ÀÇ ¹üÀ§¸¦ ÃÊ°úÇÏ¸é ´Ü¾î¸¦ ÀÚ¸¦ °ÍÀΰ¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{writing-mode:val} | obj.style.writingMode[=val] |
¢¡ °³Ã¼¼Ó ³»¿ëÀÇ ¹æÇâÀ̳ª È帧À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{z-index:val} | obj.style.zIndex[=val] |
¢¡ À§Ä¡°¡ Á¤ÇØÁ® ÀÖ´Â °³Ã¼ÀÇ ½ºÅÃÅ·(À§¿¡¼ º¸ÀÌ´Â) ¼ø¼¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{zoom:val} | obj.style.zoom[=val] |
¢¡ °³Ã¼ÀÇ È®´ë ¹èÀ²À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. |
¸Þ¼µå | ¼³¸í |
---|---|
getAttribute | ÁöÁ¤µÈ ¾ÖÆ®¸®ºäÆ®ÀÇ °ªÀ» ¹ÝȯÇÑ´Ù. |
getExpression | ÁÖ¾îÁø ¼Ó¼ºÀÇ Ç¥Çö(expression)À» ¹ÝȯÇÑ´Ù. |
setAttribute | ÁöÁ¤µÈ ¾ÖÆ®¸®ºäÆ®¸¦ ¼³Á¤ÇÑ´Ù. |
setExpression | ÁöÁ¤µÈ °³Ã¼ÀÇ Ç¥Çö(expression)À» ¼³Á¤ÇÑ´Ù. |
°³Ã¼ ¼Ó¼º Àб⠿¹Á¦
id=tdObj ¹®ÀÚ¿ |
<TABLE id=tableObj border width=400> <TR><TD width=300 id=tdObj>id=tdObj ¹®ÀÚ¿</TD><TD> </TD></TR> </TABLE> <SCRIPT> function showCurStyle(){ str='screen.width='+screen.width+'<BR>'; str+='document.body.clientWidth='+document.body.clientWidth+'<BR>'; str+='tableObj.currentStyle.width='+tableObj.currentStyle.width+'<BR>'; str+='tdObj.currentStyle.width='+tdObj.currentStyle.width; showA.innerHTML=str; } </SCRIPT> <BUTTON onclick=showCurStyle()>currentStyle</BUTTON> <DIV id=showA>°á°ú Ç¥½Ãâ</DIV>
Ŭ¸¯ÇÏ¿© ½ºÅ¸ÀÏÀ» ¹Ù²ãº¸¶ó.
<SCRIPT> function checkColor(obj){ if (obj.currentStyle.backgroundColor=='blue'){ obj.style.backgroundColor='yellow'; obj.style.color='blue'; } else { obj.style.backgroundColor='blue'; obj.style.color='white'; } str='obj.style.backgroundColor='+obj.style.backgroundColor+'<BR>'; str+='obj.style.color='+obj.style.color+'<BR>'; str+='obj.currentStyle.backgroundColor='+obj.currentStyle.backgroundColor+'<BR>'; str+='obj.currentStyle.color='+obj.currentStyle.color+'<BR>'; showA1.innerHTML=str; } </SCRIPT> <P style="background-color:blue;color:white;cusor:hand;width:300" onclick="checkColor(this)">Ŭ¸¯ÇÏ¿© ½ºÅ¸ÀÏÀ» ¹Ù²ãº¸¶ó.</P> <DIV id=showA1>°á°ú Ç¥½Ãâ</DIV>
<STYLE>div.userStyle{userProp:userRWprop;border:solid 1 blue}</STYLE> <DIV id=dObj class=userStyle>id=dObj ¹®ÀÚ¿</DIV> <SCRIPT> document.write('dObj.currentStyle.userProp='+dObj.currentStyle.userProp); </SCRIPT>