HTMLComponent is the abbreviation of HTMLComponent, and is a client component supported by IE5 and subsequent browsers. According to my personal understanding, HTC is a set of scripts that encapsulate client behavior based on DHTML. Each HTC is stored in a file of *.htc, and an HTC is a client "class".
Object
document represents HTML documents in the given browser window.
element returns a reference to the tags for the connection behavior in the main document.
PUBLIC:ATTACH binds a function to an event, so the function will be called every time the event occurs on a special object.
PUBLIC:COMPONENT specifies the contents of the file with HTC.
PUBLIC:DEFAULTS sets the default attributes of a copy of HTC.
PUBLIC:EVENT defines an HTC event to expose it to a document containing the HTC.
PUBLIC:METHOD defines a method of HTC to expose it to documents containing the HTC.
PUBLIC:PROPERTY defines the properties of an HTC to expose it to documents containing the HTC.
method
createEventObject
Create an event object, used when you need to pass event additional information to the fire method of the PUBLIC:EVENT element.
event
oncontentready
Occurs when the content of the element that connects the behavior is completely parsed.
oncontentsave
The content of an element that connects an element's behavior occurs before the content of an element is saved or copied.
ondetach
Occurs before disconnecting a behavior from an element.
ondocumentready
Occurs when the document containing the behavior is completely parsed.
The sample code is as follows:
<PUBLIC:COMPONENT>
<PUBLIC:PROPERTYNAME="grid"/><!--Return to the current Grid. Through this property, you can access the relevant information of the current Grid-->
<!--The definition of DataColumn in .Net is similar to that of -->
<PUBLIC:PROPERTYNAME="columnName"/><!--Column Name-->
<PUBLIC:PROPERTYNAME="dataType"/><!--Data types, such as System.String, are consistent with the DataType value on SmartGridColumn-->