¸ðü ¹®¼¿¡ ³ªÅ¸³ª´ÂHTC(HTML Component)ÀÇ ¸Þ¼µå¸¦ Á¤ÀÇÇÑ´Ù.
Script | ..propName[=propVal]; | |
HTML | propName="propVal"/> |
name ¾ÖÆ®¸®ºäÆ®¸¦ ÁöÁ¤ÇÏ´Â °ÍÀº ¿¤·¹¸àÆ®¿¡¼ Á¤ÀÌµÈ Ç¥ÁØ À̺¥Æ®¿Í ºñ½ÁÇÏ´Ù. ºñÇìÀ̹ö´Â ¿¤·¹¸àÆ®ÀÇ µðÆúÆ® ºñÇìÀ̹ö¸¦ µ¤¾î¾º¿î´Ù.
¼³¸íÀ» À§ÇÑ ¿¹Á¦
|
¿¤·¹¸àÆ® Á¤º¸
¸ðü ¿¤·¹¸àÆ® | PUBLIC:COMPONENT |
---|---|
¸ðü ¿¤·¹¸àÆ® | ¾ø½¿ |
ÃÖ¼Ò ¹öÀü | IE5 |
ÃÖ¼Ò OS | Windows95, WindowsNT4.0 |
¿ë±â ¹®¼¿¡ 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>