Jump to content

HTML Components

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DonToto (talk | contribs) at 00:06, 7 July 2010 (Change "JavaScript" to "JScript" as this is a Microsoft technology, so JScript is really more appropriate and accurate. (I trust this change is not being too "picky")). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

HTML Components (HTCs) are a nonstandard mechanism to implement components in script as Dynamic HTML (DHTML) "behaviors"[1] in the "Microsoft Internet Explorer" web browser. Such files typically use an .htc extension.

An HTC is typically an HTML file (with JScript / VBScript) and a set elements that define the component. This helps to organize behavior encapsulated script modules that can be attached to parts of a Webpage DOM.

Example

<BODY>
<UL>
  <LI STYLE="behavior:url(hilite.htc)">Foo Foo Foo</LI>
</UL>
</BODY>

In this example, the LI element is given the behavior defined by "hilite.htc" (a file that contains JScript code defining highlight/lowlight actions on mouse over). The same hilite.htc can then be given to any element in the HTML page - thus encapsulating the behavior defined by this file.

References