¸ðµç namespace °³Ã¼µéÀÇ ¹è¿º¯¼ö Ä÷º¼ÇÀ» ÂüÁ¶ÇÑ´Ù.
| °³Ã¼ | script | HTML | ±Ô°Ý | IE |
|---|
¼³¸íÀ» À§ÇÑ ¿¹Á¦
|
|
<HTML xmlns:newNS xmlns:otherNS> <HTML xmlns:t ="urn:schemas-microsoft-com:time"> <NEWNS:AAA/> <IMPORT namespace='otherNS' url='exp/newTag.htc'> <HTML xmlns:ns1 xmlns:ns2 xmlns:ns3><HEAD> <IMPORT namespace="ns1" implementation="some_namespace.htc"> <IMPORT namespace="ns2" implementation="some_namespace.htc"> <IMPORT namespace="ns3" implementation="some_namespace.htc"> <SCRIPT>oObj=document.namespaces</SCRIPT> |
Ä÷º¼Ç ¿¹Á¦
| Index | oObj(idx).name | oObj.item(idx).name |
|---|
¼³¸íÀ» À§ÇÑ ¿¹Á¦ÀÇ ¿¬°á ¿¹Á¦ÀÌ´Ù.
¸¶Áö¸·(index 6¹ø) À̸§ÀÚ¸®´Â À§ add ¸Þ¼µå ¼³¸í¿¡¼ Ãß°¡ÇÑ °ÍÀÌ´Ù.
<SCRIPT>
function getNS(){
objCol=document.namespaces;
str='';
for(i=0;i< document.namespaces.length;i++){
oneRow=tblObj.insertRow();
oneCell=oneRow.insertCell();
oneCell.style.backgroundColor='#ffffcc';
oneCell.innerText=i;
oneCell=oneRow.insertCell();
oneCell.innerHTML='objCol('+i+').name=<FONT color=blue>'+objCol(i).name+'</FONT>';
oneCell=oneRow.insertCell();
oneCell.innerHTML='objCol.item('+i+').name=<FONT color=blue>'+objCol.item(i).name+'</FONT>';
}
but1.disabled=true;
}
</SCRIPT>
<TABLE id=tblObj border=1 width=700>
<TR>
<TH>Index</TH>
<TH>oObj(idx).name</TH>
<TH>oObj.item(idx).name</TH>
</TR>
<COL style=text-align:center><COL style=text-align:center><COL style=text-align:center>
</TABLE>
<BUTTON id="but1" onclick="getNS();">À̸§ÀÚ¸®(namespaces) Ä÷º¼Ç Á¤º¸ º¸±â</BUTTON>