Htc basics (II)-Object

Source: Internet
Author: User

Public: property element
Bytes --------------------------------------------------------------------------------------
Define an HTC attribute to expose it to documents containing the HTC.

Format
<Public: Property
Get = "sgetfunction"
Id = "spropertyid"
Internalname = "sinternalname"
Name = "sname"
Persist = "bpersist"
Put = "sputfunction"
Value = "vvalue"
/>

Attribute
Get
Optional. The string of the function called when the specified property value is obtained. A public: property element that only specifies the get attribute but does not specify the put attribute is a read-only attribute.
ID
Optional. Public in the component: the unique identifier string of the property element. This attribute is similar to the ID attribute in DHTML.
Internalname
Optional. A string that contains the name of the method submitted in the document. The internal name must be widely correlated before any reference in the component; otherwise, a script error occurs, indicating that the name is undefined. If no internal name is specified, the name attribute is used by default.
Name
Required.Specifies the string that is exposed to the name of the attribute containing the document. By default, the name attribute is also used to submit attributes in the component, unless the internalname attribute is specified.
Persist
Optional. Specifies whether to adhere to the Boolean value of the attribute as the leaf area.
Put
Optional. Specifies the string of the function called when the property value is set. A public: property element with the get and put attributes specified is a read/write attribute. If a put function is specified and the get function fails to be specified, this attribute can only be writable. In general, this is not expected.
Value
Optional. Specifies the variable of the default attribute value.

Method
Propertyid. firechange ()
Indicates that the attribute value of a document is changed when the onpropertychange event occurs on the element. If the put attribute is not specified, onpropertychange automatically occurs when the attribute in the include document is set.

Element Information
Parent element: public: Component
Child element: None

 Remarks
When the specified name attribute is the same as the name of a standard method that has been defined for the element, a behavior can reload the default behavior of the element.
If the put or get attribute is specified, the internalname attribute is ignored. You can set and/or obtain the attribute value through the function specified in put and get attributes. The priority is higher than that set through internalname and/or the attribute value is obtained.
For a function specified by the put property, you must note that the firechange method of the public: property element is used to change the attribute value. By calling this method, the onpropertychange event occurs in the corresponding elements of the document, and the propertyname of the event object is set to the attribute name.

 

 

Public: MethodElement
Bytes --------------------------------------------------------------------------------------
Define an HTC method to expose it to documents containing the HTC.

Format
<Public: Method
Id = "Sid"
Internalname = "sinternalname"
Name = "sname"
/>

Attribute
ID
Optional. Public in the component: the unique recognition string of the method element. This attribute is similar to the ID attribute in DHTML.
Internalname
Optional. A string that contains the name of the method submitted in the document. By default, name also specifies the method submitted to the component, unless the internalname attribute is specified.

Element Information
Parent Element
Public: Component
Child Element
None
Minimum running environment
Remarks
When the specified name attribute is the same as the name of a standard method that has been defined for the element, a behavior can reload the default behavior of the element.

Public: Event Element
Bytes --------------------------------------------------------------------------------------
Define an HTC event to expose it to documents containing the HTC.

Format
<Public: Event
Id = "seventid"
Name = "sname"
/>

Attribute
ID
Optional. Public in the component: the unique recognition string of the event element. This attribute is similar to the ID attribute in DHTML.
Name
Required. String that specifies the name of the event submitted in the main document.

Method
Eventid. Fire ([oevent])
Contains document events.
This method has the following parameters:
Oevent
The object that specifies the additional information contained in the event object.

Element Information
Parent Element
Public: Component
Child Element
None
 Remarks
By specifying a name attribute, similar to a standard event that has been defined for an element, a behavior can overload the default behavior of the element.
Action-defined events do not bubble. They only occur on the elements that are connected to the behavior.

Public: DefaultsElement
Bytes --------------------------------------------------------------------------------------
Set the default attributes of HTC.

Format
<Public: Defaults
Canhavehtml = "bcanhavehtml"
Contenteditable = "beditable"
Style = "sstyle"
Tabstop = "bistabstop"
Viewinheritstyle = "binheritsstyle"
Viewlinkcontent = "bviewlinkcontent"
Viewmastertab = "bviewmastertab"
/>

Attribute
Canhavehtml
Optional. It is a Boolean value of one of the following.
False
The tag content defined in the HTC file cannot contain HTML tags.
True
The tag content defined in the HTC file can contain HTML tags.
Contenteditable
Optional. It is a Boolean value of one of the following.
Inherit
Default value. The object inherits the capability of being edited by users from its parent level.
False
The tag content defined by the HTC file cannot be edited.
True
You can edit the TAG content defined in the HTC file.
Style
Optional. Specifies the style string of the tag defined by the HTC file.
Tabstop
Optional. It is a Boolean value of one of the following.
False
Default value. The tag defined by the HTC file cannot be activated by the tab.
True
The tag defined by the HTC file can be selected and activated by the tab.
Viewinheritstyle
Optional. It is a Boolean value of one of the following.
False
Viewlink does not inherit styles from the main HTML file.
True
Default value. Viewlink inherits the style from the main HTML file.
Viewlinkcontent
Optional. It is a Boolean value of one of the following.
False
Default value. Tags in HTC documents are not used as viewlink.
True
The tag in the HTC file is used as viewlink.
Viewmastertab
Optional. It is a Boolean value of one of the following.
False
The main element of viewlink is not included in the tab sequence of the main document.
True
Default value. The main element of viewlink is included in the tab sequence of the main document.

Element Information
Parent Element
Public: Component
Child Element
None

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.