ź·ÂÀûÀ¸·Î ¿¤·¹¸àÆ®ÀÇ ºñÇìºñ¾î¸¦ ¹®¼·Î µµÀÔÇÑ´Ù. napespaces Ä÷º¼ÇÀÇ ÇÑ°³ÀÇ ¿ä¼ÒÀÌ´Ù.
|
Script |
[propVal=.].propName; |
HTML |
<HTML xmlns:newNS> |
¼³¸íÀ» À§ÇÑ ¿¹Á¦
|
<HTML xmlns:newNS xmlns:otherNS>
<HTML xmlns:t ="urn:schemas-microsoft-com:time">
<newNS:AAA/>
<IMPORT namespace='otherNS' url='exp/newTag.htc'>
<SCRIPT>
document.write('document.namespaces.length='+document.namespaces.length+'<BR>');
for (i=0;i< document.namespaces.length;i++){
document.write('document.namespaces('+i+').name='+document.namespaces(i).name+'<BR>');
}
oObj=document.namespaces[0];
</SCRIPT>
|
name ¼Ó¼º
IE
¢¡ À̸§ÀÚ¸®ÀÇ À̸§À» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].name
ÄÚµå: document.write(oObj.name);
°á°ú:
readyState ¼Ó¼º
IE
¢¡ °³Ã¼ÀÇ ÇöÀç »óŸ¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].readyState
ÄÚµå: document.write(oObj.readyState);
°á°ú:
ÄÚµå: <SPAN id=SwRS></SPAN> <BUTTON onclick="SwRS.innerText=oObj.readyState">Ŭ¸¯</BUTTON>
°á°ú:
urn ¼Ó¼º
IE
¢¡ °³Ã¼ÀÇ ÁÖ¼Ò¸¦ ¹ÝȯÇϰųª ÁöÁ¤ÇÑ´Ù.
¹®¹ý: .urn[=urlVal]
ÄÚµå: document.write(document.namespaces[2].urn)
°á°ú:
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>
°á°ú:
detachEvent ¸Þ¼µå
IE -
¢¡
attachEvent À̺¥Æ®·Î ÷ºÎµÈ À̺¥Æ®¸¦ Á¦°ÅÇÑ´Ù. ¹Ýȯ°ªÀº ¾ø´Ù.
¹®¹ý: .detachEvent(event,funcion)
ÄÚµå: <INPUT type=button value="detachEvent" onclick="document.detachEvent('ondblclick',callFunc)"></SPAN>
°á°ú: // Ŭ¸¯ ÈÄ¿¡´Â attachEvent¿¡¼ ¼³Á¤µÈ À̺¥Æ®°¡ Á¦°ÅµÈ´Ù. Á¦°Å ÈÄ ´õºíŬ¸¯ÇØ º¸¶ó.
doImport ¸Þ¼µå
IE -
¢¡ ź·ÂÀûÀ¸·Î ¿¤·¹¸àÆ®ÀÇ ºñÇìºñ¾î(behavior)¸¦ µµÀÔÇÑ´Ù.
¹®¹ý: .doImport(urlVal)
ÄÚµå: <INPUT type=button value="doImport" onclick="document.namespaces('newNS').doImport('exp/newTag.htc');newObj=document.all.tags('AAA')[0];alert(newObj.nodeName);showNs.innerHTML='<XMP style=margin:0;padding:0;color:blue>'+newObj.outerHTML+'</XMP>';">
°á°ú: <AAA>°¡ ¸¸µé¾îÁø ¿¤·¹¸àÆ®ÀÌ´Ù.