public:component元素
--------------------------------------------------------------------------------------
以htc指明文件的内容。
微软internet explorer 6中的新内容
literalcontent属性作为一个新的可能值支持嵌套,创建一份嵌套的文字内容元素行为。
格式
<public:component
id = "sid"
lightweight = "blight"
literalcontent = "sliteral"
name = "sname"
supportseditmode = "beditable"
tagname = "stagname"
urn = "surn"
>
<!-- 子级元素 -->
</public:component>
属性
id
可选。组件内public:component元素的唯一识别字符串。这个属性类似于dhtml中的id属性。
lightweight
可选。指定htc文件是否包含标签的字符串。如果htc文件不包含标签,这个属性应当设置为true来改进表现效果。这个属性对任何htc文件均有效。
true
htc文件不包含标签,因而无需每次都解析并表现自定义标签。这些标签由htc文件定义,在主文档中使用。
false
默认值。htc包含必需解析并表现的自定义标签。这些标签由htc文件定义,在主文档中使用。
literalcontent
可选。指定自定义标签包含的内容是被解析并表现,还是作为数据岛处理的字符串。这个属性仅在htc文件定义一个元素行为时有效,此时需要使用tagname属性。更多信息请查阅备注。
false
默认值。由tagname属性定义的标签内的文本和标签并作为数据岛处理,而是解析并表现。
nested
internet explorer 6及后继版本。content within the first opening and last closing of the tag defined by the tagname attribute is treated as a data island and is not parsed or rendered.更多信息请查阅使用literalcontent属性。
true
content within the first opening and last closing of the tag defined by the tagname attribute is treated as a data island and is not parsed or rendered.
name
可选。指定主文档中提交的行为的名称的字符串。
supporteditmode
可选。指定htc文件内容是否可编辑的字符串。这个属性仅在htc文件定义一个元素行为时有效。
true
htc文件包含的标签可编辑。
false
默认值。htc文件包含的标签不可编辑。你能够通过对htc文件中每个元素设定iscontenteditable属性为variant_true来重载此属性值。
tagname
可选。指定自定义标签名称的字符串,此标签由htc文件定义并导入到主文档中。这个属性仅在htc文件定义一个元素行为时有效。更多信息请查阅备注。
urn
可选。字符串,以统一资源名称(urn)格式,从而唯一识别此组件。因而在多个行为发生在同一名称的事件时可以唯一的识别。当事件发生,event对象的srcurn属性被设定为发生在事件上行为的urn。