link °³Ã¼´Â ÇöÀç ¹®¼¿¡¼ ´Ù¸¥ ¸ñÇ¥ window °³Ã¼¿¡ ¿¬°á½Ãų ¹®¼¸¦ ÂüÁ¶ÇÑ´Ù.
Script | [propVal=]..propName; | |
HTML | propName="propVal">innerString |
LINK ¿¤·¹¸àÆ®´Â HEAD ¿¤·¹¸àÆ® ¼Ó¿¡¼¸¸ »ç¿ëµÉ ¼ö ÀÖ´Ù.
¿¤·¹¸àÆ®´Â IE3.0¿¡¼ »ç¿ëµÇ°í, ½ºÅ©¸³Æ®´Â IE4.0¿¡¼ ºÎÅÍ Áö¿øµÈ´Ù.
ÀÌ ¿¤·¹¸àÆ®´Â Ç¥ÇöµÇÁö ¾ÊÀ¸¸ç Á¾·áűװ¡ ÇÊ¿ä ¾ø´Ù.
ÀÌ °³Ã¼´Â (¿µ¹®)HTML3.2¿¡ Á¤ÀǵǾú°í (¿µ¹®)DOM Level 1(W3C Document Object Model)¿¡ Á¤ÀǵǾú´Ù.
¼³¸íÀ» À§ÇÑ ¿¹Á¦
<HEAD> <LINK rel="stylesheet" type="text/css" href="../public/jscript.css" id=oObj class=blue blockDirection=ltr dir=ltr hreflang=ko label=linklabel lang=ko name=linkName target="linkTarget"> </HEAD> |
¼³¸íÀ» À§ÇÏ¿© ÆäÀÌÁö Á¦ÀÏ À§ <HEAD></HEAD>ÀÇ <LINK> ¿¤·¹¸ÇÆ®¸¦ »ç¿ëÇÏ°í ¼Ò½º¸¦ Á¦°øÇÑ´Ù. |
Ä÷º¼Ç | ¼³¸í°ú ¿¹Á¦ ÄÚµå | °á°ú | Âü°í |
---|---|---|---|
all | °³Ã¼¿¡ Æ÷ÇԵǾî ÀÖ´Â ¸ðµç ¿¤·¹¸àÆ®µéÀÇ ¹è¿º¯¼ö¸¦ ÂüÁ¶ÇÏ°í ¹ÝȯÇÑ´Ù. | ||
<SCRIPT>document.write(oObj.all.length)</SCRIPT> | |||
attributes | °³Ã¼ÀÇ ¾ÖÆ®¸®ºäÆ®(attribute °³Ã¼)µéÀÇ ¹è¿º¯¼ö¸¦ ÂüÁ¶ÇÏ°í ¹ÝȯÇÑ´Ù. | ||
<SCRIPT>document.write(oObj.attributes.length)</SCRIPT> | |||
behaviorUrns | ¿¤·¹¸àÆ®¿¡ ÷ºÎµÈ ºñÇØÀ̹ö(behavior)µéÀ» ÀνÄÇÏ´Â ÁÖ¼Ò(URN) ¹®ÀÚ¿µéÀÇ ¹è¿º¯¼ö¸¦ ÂüÁ¶ÇÏ°í ¹ÝȯÇÑ´Ù. | ||
<SCRIPT>document.write(oObj.behaviorUrns.length)</SCRIPT> | |||
childNodes | °³Ã¼ÀÇ ¹Ù·Î Á¾¼ÓµÈ ÀڽĵéÀÇ ¿¤·¹¸àÆ® °³Ã¼µé°ú TextNode °³Ã¼µéÀÇ ¹è¿º¯¼ö¸¦ ÂüÁ¶ÇÏ°í ¹ÝȯÇÑ´Ù. | ||
<SCRIPT>document.write(oObj.childNodes.length)</SCRIPT> | |||
children | °³Ã¼ÀÇ ¹Ù·Î Á¾¼ÓµÈ DHTML °³Ã¼µéÀÎ ÀڽĵéÀÇ ¹è¿º¯¼ö¸¦ ÂüÁ¶ÇÏ°í ¹ÝȯÇÑ´Ù. | ||
<SCRIPT>document.write(oObj.children.length)</SCRIPT> |
style | script |
---|---|
{background-position-x:val} | obj.style.backgroundPositionX[=val] |
¢¡ backgroundPosition ¼Ó¼ºÀÇ x ÁÂÇ¥¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{background-position-y:val} | obj.style.backgroundPositionY[=val] |
¢¡ backgroundPosition ¼Ó¼ºÀÇ y ÁÂÇ¥¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{behavior:val} | obj.style.behavior[=val] |
¢¡ DHTML behaviorÀÇ ¼Ò°³ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{media:val} | obj.style.media[=val] |
¢¡ ¸Þµð¾î Çü½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelBottom[=val] |
¢¡ °³Ã¼ÀÇ ¾Æ·¡ÂÊ À§Ä¡¸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelHeight[=val] |
¢¡ °³Ã¼ÀÇ ³ôÀ̸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelLeft[=val] |
¢¡ °³Ã¼ÀÇ ¿ÞÂÊ À§Ä¡¸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelRight[=val] |
¢¡ °³Ã¼ÀÇ ¿À¸¥ÂÊ À§Ä¡¸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelTop[=val] |
¢¡ °³Ã¼ÀÇ À§ÂÊ À§Ä¡¸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.pixelWidth[=val] |
¢¡ °³Ã¼ÀÇ ³Êºñ¸¦ Çȼ¿´ÜÀ§·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posBottom[=val] |
¢¡ bottom ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ ¾Æ·¡ÂÊ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posHeight[=val] |
¢¡ height ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ ³ôÀ̸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posLeft[=val] |
¢¡ left ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ ¿ÞÂÊ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posRight[=val] |
¢¡ right ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ ¿À¸¥ÂÊ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posTop[=val] |
¢¡ top ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ À§ÂÊ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
¾ø½¿ | obj.style.posWidth[=val] |
¢¡ width ¾ÖÆ®¸®ºäÆ®·Î ÁöÁ¤µÈ ´ÜÀ§·Î °³Ã¼ÀÇ ³Êºñ¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{text-autospace:val} | obj.style.textAutospace[=val] |
¢¡ Á¶Á¤µÈ ¹®ÀÚ¸¦ À§ÇÑ ÀÚµ¿ ¹®ÀÚ °£°Ý ¸ÂÃ߱⸦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. | |
{text-underline-position:val} | obj.style.textUnderlinePosition[=val] |
¢¡ °³Ã¼ÀÇ textDecoration ¼Ó¼ºÀÌ 'underline'·Î ¼³Á¤µÈ °æ¿ì ¹ØÁÙÀÇ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. |
¸Þ¼µå | ¼³¸í |
---|---|
addBehavior | ¿¤·¹¸àÆ®¿¡ behavior¸¦ Ãß°¡ÇÑ´Ù. |
applyElement | °³Ã¼¸¦ ´Ù¸¥ ¿¤·¹¸àÆ®ÀÇ ÀÚ½ÄÀ̳ª ¸ðü °³Ã¼·Î ¸¸µç´Ù. |
attachEvent | IE -
À̺¥Æ®¿¡ ƯÁ¤ ±â´ÉÀ» ¹¾î, ±â´ÉÇÔ¼ö°¡ °³Ã¼¿¡¼ À̺¥Æ®°¡ ¹ß»ýµÇ¸é ¾ðÁ¦³ª È£ÃâµÇ°Ô ÇÑ´Ù. À̺¥Æ®ÀÇ Á¦°Å´Â detachEvent¿¡¼ ÇÑ´Ù. ¹Ýȯ°ªÀº ºÎ¿ï°ªÀÌ´Ù. ¹®¹ý: [bVal=].object.attachEvent(event,functObj)
event´Â Çʼö¿ä¼ÒÀÌ°í, Ç¥ÁØ À̺¥Æ® ¹®ÀÚ¿ÀÌ´Ù. functObjµµ Çʼö¿ä¼ÒÀÌ°í À̺¥Æ®°¡ ¹ß»ýµÇ¸é È£ÃâµÉ ±â´ÉÇÔ¼öÀÌ´Ù.ÄÚµå: function callFunc(){alert('ondblclick À̺¥Æ® ¹ß»ý')}document.attachEvent('ondblclick',callFunc) °á°ú: // ¹®¼ À§ ¾Æ¹«µ¥¼³ª ´õºíŬ¸¯ ÇØ º¸¶ó. ÄÚµå:<INPUT type=button value="attachEvent Àç¼³Á¤" onclick="document.detachEvent('ondblclick',callFunc);document.attachEvent('ondblclick',callFunc)"></SPAN> °á°ú: |
clearAttributes | °³Ã¼ÀÇ ¸ðµç ¾ÖÆ®¸®ºäÆ®µé°ú °ªµéÀ» »èÁ¦ÇÑ´Ù. |
cloneNode | ¹®¼ °èÅëµµ·ÎºÎÅÍ °³Ã¼ÀÇ ÂüÁ¶¸¦ º¹»çÇÑ´Ù. |
componentFromPoint | ¾î¶² À̺¥Æ®¿¡¼ ÁöÁ¤µÈ ÁÂÇ¥¿¡ À§Ä¡ÇÑ ÄÞÆ÷³ÙÆ®¸¦ ¹ÝȯÇÑ´Ù. |
contains | °³Ã¼ ¼Ó¿¡ ÁÖ¾îÁø ¿¤·¹¸àÆ®°¡ Àִ°¡¸¦ Á¡°ËÇÑ´Ù. |
detachEvent | IE5 -
attachEvent À̺¥Æ®·Î ÷ºÎµÈ À̺¥Æ®¸¦ Á¦°ÅÇÑ´Ù. ¹Ýȯ°ªÀº ¾ø´Ù.
¹®¹ý: .detachEvent(event,funcion)
ÄÚµå: <INPUT type=button value="detachEvent" onclick="document.detachEvent('ondblclick',callFunc)"></SPAN>°á°ú: // Ŭ¸¯ ÈÄ¿¡´Â attachEvent¿¡¼ ¼³Á¤µÈ À̺¥Æ®°¡ Á¦°ÅµÈ´Ù. Á¦°Å ÈÄ ´õºíŬ¸¯ÇØ º¸¶ó. |
fireEvent | °³Ã¼¿¡¼ ÁöÁ¤ÇÑ À̺¥Æ®¸¦ ¹ß»ý½ÃŲ´Ù. |
getAdjacentText | °³Ã¼ÀÇ ÀÎÁ¢ ¹®ÀÚ¿À» ¹ÝȯÇÑ´Ù. |
getAttribute | ÁöÁ¤µÈ ¾ÖÆ®¸®ºäÆ®ÀÇ °ªÀ» ¹ÝȯÇÑ´Ù. |
getAttributeNode | IE6 attribute.name¼Ó¼ºÀ» ÂüÁ¶ÇÏ´Â attribute °³Ã¼¸¦ ¹ÝȯÇÑ´Ù. |
getBoundingClientRect | TextRectangle °³Ã¼µéÀÇ Ä÷º¼Ç¿¡ ¿¬°áµÊÀ» ÁöÁ¤ÇÏ´Â °³Ã¼¸¦ ¹ÝȯÇÑ´Ù. |
getClientRects | °³Ã¼ÀÇ ³»¿ëÀ̳ª Ŭ¶óÀ̾ðÆ® ¹üÀ§(range)ÀÇ ¹èÄ¡(layout)¸¦ ±â¼úÇÏ´Â »ç°¢Çü(rectangle)µéÀÇ Ä÷º¼ÇÀ» ¹ÝȯÇÑ´Ù. °¢ »ç°¢ÇüÀº ÇÑ ÁÙÀÌ´Ù. |
getElementsByTagName | ÁöÁ¤µÈ ¿¤·¹¸àÆ®ÀÇ À̸§¿¡ ¸Â´Â °³Ã¼µéÀÇ Ä÷º¼ÇÀ» ¹ÝȯÇÑ´Ù. |
handleEvent |
- NS
°³Ã¼¿¡¼ ÁöÁ¤µÈ À̺¥Æ®¸¦ À§ÇÑ Ã³¸®ÀÚ¸¦ È£ÃâÇÑ´Ù .
¹®¹ý: linkObj.handleEvent('event') |
hasChildNodes | °³Ã¼°¡ Àڽݳü¸¦ °¡Áö°í °¡Áö°í Àִ°¡¸¦ ³ªÅ¸³»´Â °ªÀ» ¹ÝȯÇÑ´Ù. |
insertAdjacentElement | ÁöÁ¤ÇÑ À§Ä¡¿¡ ¿¤·¹¸àÆ®¸¦ »ðÀÔÇÑ´Ù. |
mergeAttributes | ÁöÁ¤µÈ °³Ã¼¿¡ ¸ðµç Àбâ/¾²±â ¾ÖÆ®¸®ºäÆ®¸¦ º¹»çÇÑ´Ù. |
normalize | IE6 °³Ã¼ÀÇ ÀÎÁ¢ TextNode °³Ã¼¸¦ ÅëÇÕÇÏ¿© ¹®¼ °³Ã¼ ¸ðµ¨À» Á¤»óÈÇÑ´Ù. |
removeAttribute | °³Ã¼·Î ºÎÅÍ ¾ÖÆ®¸®ºäÆ®¸¦ Á¦°ÅÇÑ´Ù. |
removeAttributeNode | IE6 °³Ã¼·Î ºÎÅÍ ¾ÖÆ®¸®ºäÆ® °³Ã¼ ³ëµå¸¦ Á¦°ÅÇÑ´Ù. |
removeBehavior | °³Ã¼·ÎºÎÅÍ behavior¸¦ Á¦°ÅÇÑ´Ù. |
replaceAdjacentText | °³Ã¼¿¡ ÀÎÁ¢ ¹®ÀÚ¿À» ±³Ã¼ÇÑ´Ù. |
setAttribute | ÁöÁ¤µÈ ¾ÖÆ®¸®ºäÆ®¸¦ ¼³Á¤ÇÑ´Ù. |
setAttributeNode | IE6 °³Ã¼ÀÇ ºÎºÐÀ¸·Î ¾ÖÆ®¸®ºäÆ® °³Ã¼ ³ëµå¸¦ ¼³Á¤ÇÑ´Ù. |
swapNode | ¹®¼ °èÅëµµ¿¡¼ µÎ °³Ã¼ÀÇ À§Ä¡¸¦ ¼·Î ¹Ù²Û´Ù. |
Behavior | ¼³¸í |
---|---|
clientCaps | Explorer¿¡ ´ëÇÑ Á¤º¸¸¦ Á¦°øÇÏ°í ¿äû¿¡ ÀÇÇÏ¿© ºê¶ó¿ìÀúÀÇ ÄÞÆ÷³ÙÆ®¸¦ ¼³Ä¡ÇÏ´Â ¹æ¹ý´Ã Á¦°øÇÑ´Ù. |
download | ÆÄÀÏÀ» ´Ù¿î·ÎµåÇÏ°í ¿Ï·áµÇ¸é ¿Ï·á¸¦ ¾Ë·ÁÁÖ´Â ±â´ÉÀ» °®°íÀÖ´Ù. |
homePage | »ç¿ëÀÚÀÇ È¨ÆäÀÌÁö¿¡ ´ëÇÑ Á¤º¸¸¦ Æ÷ÇÔÇÏ°í ÀÖ´Ù. |
LINK ¿¤·¹¸àÆ®·Î Àû¿ëµÈ ¸¦ ¿ÜºÎ ½ºÅ¸ÀϽ¬Æ®ÀÇ ³»¿ë¿¡ Á¢¼ÓÇÑ´Ù.
<SCRIPT> document.write('oObj.type='+oObj.type+'<BR>'); allCol=document.all.tags('LINK'); document.write('allCol[0].type='+allCol[0].type+'<BR>'); document.write('allCol[0].href='+allCol[0].href+'<BR>'); document.write('allCol[0].styleSheet.rules.length='+allCol[0].styleSheet.rules.length+'<BR>'); document.write('allCol[0].styleSheet.rules[0].selectorText='+allCol[0].styleSheet.rules[0].selectorText+'<BR>'); document.write('allCol[0].styleSheet.rules[0].cssText=<FONT color=blue>'+ allCol[0].styleSheet.rules[0].style.cssText+'</FONT>'); </SCRIPT>