ÃÖ»óÀ§ ¹®¼¿¡ ¼³Á¤µÈ ½ºÅ¸ÀϽ¬Æ®(CSS)¸¦ ¹®¼ÀÇ Á¶°¢¿¡ »ó¼ÓÇϴ°¡¸¦ ³ªÅ¸³»´Â °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
true | µðÆúÆ®À̸ç, ½ºÅ¸ÀϽ¬Æ®°¡ ¹®¼ÀÇ Á¶°¢¿¡ »ó¼ÓµÈ´Ù. |
false | ½ºÅ¸ÀϽ¬Æ®°¡ ¹®¼ÀÇ Á¶°¢¿¡ »ó¼ÓµÇÁö ¾Ê´Â´Ù. |
ÀÌ ¼Ó¼ºÀº Àбâ/¾²±â·Î µðÆúÆ®°ªÀº trueÀÌ´Ù.
viewInheritStyle°¡ ·Î ¼³Á¤µÇ¾úÀ» ¶§ CSS ½ºÅ¸ÀÏÀÌ »ó¼ÓµÉ ¼ö ÀÖ´Ù. CSS ½ºÅ¸ÀÏÀÇ »ó¼ÓÀº ÇöÀç ¹®¼ Á¶°¢¿¡ ÀÖ´Â ½ºÅ¸ÀÏ Áß ÇØ´ç ½ºÅ¸ÀÏÀÌ ÀÌ¹Ì Á¤ÀǵÇÁö ¾ÊÀº ¿¤·¹¸àÆ®¿¡¸¸ Àû¿ëµÈ´Ù.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
ÁÖ ¹®¼¿¡¼ ¹®¼ Á¶°¢À¸·Î CSS ½ºÅ¸ÀÏ fontStyle, fontSize¿Í color ¼Ó¼ºÀº »ó¼ÓµÇ¾ú´Ù.
µÎ°¡Áö ÀÌÀ¯·Î border ¼Ó¼ºÀº »ó¼ÓµÇÁö ¾Ê´Â´Ù. border ¼Ó¼ºÀº »ó¼ÓµÇÁö ¾Ê´Â ¼Ó¼ºÀÌ°í, ¹®¼ Á¶°¢ÀÇ div ¿¤·¹¸àÆ®¿¡ ¸í½ÃÀûÀ¸·Î ¼³Á¤ÇÏ¿´±â ¶§¹®ÀÌ´Ù.
div ű׿¡´Â ¿¤·¹¸àÆ® ºñÇìÀ̹ö°¡ ÷ºÎµÈ ÀÛ¼ºÀÚ Å±×(AAA:myTag)°¡ Æ÷ÇԵǾî ÀÖ´Ù. ÁÖ ¹®¼ÀÇ div ű׿¡´Â ¸î°¡Áö ½ºÅ¸ÀÏÀÌ ÁöÁ¤µÇ¾ú´Ù
<HTML xmlns:AAA> <HEAD> <IMPORT namespace="AAA" implementation="../property/exp/viewInheritStyle.htc"> </HEAD> <BODY> <DIV style="font-style:italic;color:blue;font-size:14pt;border:2 solid blue;padding:5"> ÁÖ ¹®¼ÀÇ DIV ¿¤·¹¸àÆ® ³»ºÎ ÅؽºÆ®.<BR> <AAA:myTag id=newElem>ÀÛ¼ºÀÚ ÅÂ±× ³»¿ë</AAA:myTag> </DIV> <SCRIPT> document.write('newElem.nodeName='+newElem.nodeName+'<BR>'); document.write('newElem.tagName='+newElem.tagName+'<BR>'); document.write('newElem.innerText='+newElem.innerText+'<BR>'); </SCRIPT> </BODY> </HTML>
´ÙÀ½Àº ../property/exp/viewInheritStyle.htc ÆÄÀÏ HTA ³»¿ëÀÌ´Ù.
HTA ÆÄÀÏ¿¡´Â ¹®¼Á¶°¢ÀÌ Æ÷ÇԵǾî ÀÖ°í ±× ¼Ó¿¡ div ű״ ´ÙÀ½ ½ºÅ¸ÀÏÀÌ Àû¿ëµÈ´Ù.
ÁÖ ¹®¼ÀÇ div ¿¤·¹¸àÆ® ¼Ó¿¡ ÀÛ¼ºÀÚ Å±װ¡ Æ÷ÇÔµÇ°í ½ºÅ¸ÀÏÀÌ ¼³Á¤µÇ¾î Àû¿ëµÇ´Ù°¡ viewInheritStyle ¼Ó¼ºÀÌ true°¡ µÇ¸é Á¶°¢ÀÇ ½ºÅ¸ÀÏÀÌ »ó¼ÓµÇ¾î º¯°æµÈ´Ù.
<PUBLIC:component tagName="myTag"> <ATTACH event="oncontentready" onevent=init() /> </PUBLIC:component> <SCRIPT> function init(){ defaults.viewLink=document; defaults.viewInheritStyle=false; showResult(); } function butClick(){ boolInherit = defaults.viewInheritStyle; if (boolInherit==true) defaults.viewInheritStyle=false; else defaults.viewInheritStyle=true; showResult(); } function showResult(){ showA.innerHTML='defaults.viewInheritStyle=<B>'+defaults.viewInheritStyle+'</B>'; } </SCRIPT> <BODY> <DIV id="showA" style= "text-Align:center;font-size:20;border:2 solid green;padding:5"></DIV><BR> <INPUT id=butObj type=button value="viewInheritStyle ¼Ó¼º º¯°æ" onclick="butClick()"> </BODY>