DATAFORMATAS Attribute | dataFormatAs参数属性
| DHTML文档教程 |
Sets or retrieves how to render the data supplied to the object.
dhtml语法
HTML | <ELEMENT DATAFORMATAS
= sFormat... >
|
---|
Scripting | object.dataFormatAs [ = sFormat ] |
---|
DHTML可能的值
sFormat | String that
specifies or receives one of the following values.text | Default. Data is rendered as text. | html | Data is rendered as HTML. | localized-text | Microsoft® Internet Explorer 5.01 and later versions. Data is rendered using the locale settings of the client machine. |
|
The property is read/write.
The property has a default value of
text.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks
internet explorer 5.01 or later honors the user's control panel regional settings when the dataformatas attribute is set to localized-text. internet explorer 5.01 or later performs a locale-dependent type conversion on the native value, instead of asking the data source object to perform the conversion, when binding a textual element such as a span, div, or input to date, currency, or numeric data. internet explorer 5 does not provide this feature. to compensate for this limitation, a data source object can implement isimpledataconverter to participate in the conversion. neither of these features is supported in earlier versions of internet explorer.
Examples
This div example renders data in HTML format.
<DIV DATAFLD="Column2" DATAFORMATAS="html"></DIV>
This span example renders data in HTML format.
<SPAN DATASRC="#bank_acct" DATAFLD="balance" DATAFORMATAS="html"></SPAN>
This textarea example renders data in text format.
<textarea datasrc="#customer" datafld="address" dataformatas="text" rows=6 cols=60></textarea>
是否符合公共标准
There is no public standard that applies to this property.
Applies To
更多语法参考
Introduction to Data Binding