¸ðü ¹®¼­¿¡ ³ªÅ¸³ª´ÂHTC(HTML Component)ÀÇ ¸Þ¼­µå¸¦ Á¤ÀÇÇÑ´Ù.

Script ..propName[=propVal];
HTML propName="propVal"/>
Ư±â

name ¾ÖÆ®¸®ºäÆ®¸¦ ÁöÁ¤ÇÏ´Â °ÍÀº ¿¤·¹¸àÆ®¿¡¼­ Á¤ÀÌµÈ Ç¥ÁØ À̺¥Æ®¿Í ºñ½ÁÇÏ´Ù. ºñÇìÀ̹ö´Â ¿¤·¹¸àÆ®ÀÇ µðÆúÆ® ºñÇìÀ̹ö¸¦ µ¤¾î¾º¿î´Ù.

ÂüÁ¶
behavior, PUBLIC:EVENT, PUBLIC:PROPERTY

¼³¸íÀ» À§ÇÑ ¿¹Á¦


¿¤·¹¸àÆ® Á¤º¸

¸ðü ¿¤·¹¸àÆ® PUBLIC:COMPONENT
¸ðü ¿¤·¹¸àÆ® ¾ø½¿
ÃÖ¼Ò ¹öÀü IE5
ÃÖ¼Ò OS Windows95, WindowsNT4.0

id ( id="sID"> ¾ÖÆ®¸®ºäÆ®)
¢¡ ¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç, ÄÞÆ÷³ÙÆ® ¼ÓÀÇ PUBLIC:PROPERTY ¿¤·¹¸àÆ®ÀÇ À¯ÀÏÇÑ ÀνÄÀÚ¸¦ ÁöÁ¤ÇÏ´Â ¹®ÀÚ¿­ÀÌ´Ù.
¹®¹ý: .id[=sID]
ÄÚµå: document.write(oObj.id) °á°ú:
internalname ( internalname="sInternalName"> ¾ÖÆ®¸®ºäÆ®)
¢¡ ¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç, ÄÞÆ÷³ÙÆ® ¼ÓÀÇ ¾î´À ¸Þ¼­µå°¡ ÂüÁ¶µÇ´Â°¡¸¦ ³ªÅ¸³»´Â À̸§À» ÁöÁ¤ÇÏ´Â ¹®ÀÚ¿­ÀÌ´Ù.
¹®¹ý: .internalname[=sInternalname]
ÄÚµå: document.write(oObj.internalname) °á°ú:
name ( name="sName"> ¾ÖÆ®¸®ºäÆ®)
¢¡ ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, ¿ë±â ¹®¼­¿¡¼­ ÂüÁ¶µÇ´Â ¸Þ¼­µåÀÇ À̸§À» ÁöÁ¤ÇÏ´Â ¹®ÀÚ¿­ÀÌ´Ù.
¹®¹ý: .name[=sName]
ÄÚµå: document.write(oObj.name) °á°ú:

Ŭ¸¯ÇÏ¿© °á°ú ¾ò±â

¿ë±â ¹®¼­¿¡ PUBLIC:METHOD ű׷ΠHTC doShow ¸Þ¼­µå¸¦ »ý¼ºÇÏ¿© È£ÃâÇÏ¿´´Ù.

<HEAD>
<STYLE>.publicShow {behavior:url(../object/exp/myShow.htc)}</STYLE>
</HEAD>
<BODY>
<DIV class="publicShow" id="showId" name="showName"
  style="height:2em;border:solid 1 blue;background:ffa" onclick="this.doShow()">Ŭ¸¯ÇÏ¿© °á°ú ¾ò±â</DIV>

../object/exp/myTestHTC.htcÀÇ ³»¿ë
<PUBLIC:COMPONENT name="doShowCom">
<PUBLIC:METHOD name="doShow" />
<SCRIPT>
function doShow(){
  str='event.type='+event.type+'\n';
  str+='this.id='+this.id+'\n';
  str+='this.name='+this.name+'\n';
  str+='this.nodeName='+this.nodeName+'\n';
  str+='this.className='+this.className+'\n';
  str+='this.style.cssText='+this.style.cssText+'\n';
  prevColor = this.style.color;
  str+='this.style.color='+this.style.color+'\n';
  element.style.color  = 'red';
  element.style.cursor = 'hand';
  str+='element.style.color='+element.style.color+'\n';
  str+='element.style.cursor='+element.style.cursor+'\n';
  alert(str);
}
</SCRIPT>
</PUBLIC:COMPONENT>