XhtmlTextWriter.ElementSpecificAttributes 属性

定义

获取一个包含特定于元素的特性的 Hashtable 对象。Gets a Hashtable object containing element-specific attributes.

protected:
 property System::Collections::Hashtable ^ ElementSpecificAttributes { System::Collections::Hashtable ^ get(); };
protected System.Collections.Hashtable ElementSpecificAttributes { get; }
member this.ElementSpecificAttributes : System.Collections.Hashtable
Protected ReadOnly Property ElementSpecificAttributes As Hashtable

属性值

Hashtable

一个 Hashtable 对象,其中包含特定于元素的特性。A Hashtable object containing element-specific attributes.

注解

使用 AddRecognizedAttribute 方法可将可识别的特性添加到 XHTML 元素。Use the AddRecognizedAttribute method to add recognized attributes to an XHTML element. 若要删除 XHTML 元素上的公共属性,请使用 RemoveRecognizedAttribute 方法。To remove common attributes on an XHTML element, use the RemoveRecognizedAttribute method.

创建类的新实例时 XhtmlTextWriter ,将 Hashtable 使用下表中显示的属性填充特定于元素的特性的对象。When a new instance of the XhtmlTextWriter class is created, the Hashtable object of element-specific attributes is populated with the attributes shown in the following table.

元素Element 属性Attributes
<a> accesskey, href, charset, hreflang, rel, type, rev, title, tabindexaccesskey, href, charset, hreflang, rel, type, rev, title, tabindex
<base> href
<blockquote> cite
<br> id, class, titleid, class, title
<form> action, method, enctypeaction, method, enctype
<head> xml:lang
<html> version, xml:lang, xmlnsversion, xml:lang, xmlns
<img> src, alt, width, longdesc, heightsrc, alt, width, longdesc, height
<input> size, accesskey, title, name, type, disabled, value, src, checked, maxlength, tabindexsize, accesskey, title, name, type, disabled, value, src, checked, maxlength, tabindex
<label> accesskey, foraccesskey, for
<li> value
<link> hreflang, rev, type, charset, rel, href, mediahreflang, rev, type, charset, rel, href, media
<meta> content, name, xml:lang, http-equiv, schemecontent, name, xml:lang, http-equiv, scheme
<object> codebase, classid, data, standby, name, type, height, archive, declare, width, tabindex, codetypecodebase, classid, data, standby, name, type, height, archive, declare, width, tabindex, codetype
<ol> start
<optgroup> label, disabledlabel, disabled
<option> selected, valueselected, value
<param> id, name, valuetype, value, typeid, name, valuetype, value, type
<pre> xml:space
<q> cite
<select> name, tabindex, disabled, multiple, sizename, tabindex, disabled, multiple, size
<style> xml:lang, xml:space, type, title, mediaxml:lang, xml:space, type, title, media
<table> width, summarywidth, summary
<textarea> name, cols, accesskey, tabindex, rowsname, cols, accesskey, tabindex, rows
<td> headers, align, rowspan, colspan, axis, scope, abbr, valignheaders, align, rowspan, colspan, axis, scope, abbr, valign
<th> headers, align, rowspan, colspan, axis, scope, abbr, valignheaders, align, rowspan, colspan, axis, scope, abbr, valign
<title> xml:lang
<tr> align, valignalign, valign

有关呈现的元素和样式的详细信息,请参阅 万维网联合会 (W3C) 网站上的 XHTML 模块化规范。For more information on the elements and styles that are rendered, see the XHTML modularization specification at the World Wide Web Consortium (W3C) Web site.

适用于

另请参阅