EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

dataformatas attribute | dataFormatAs property

Sets or retrieves the rendering format for the data supplied to the object.

Syntax

HTML<element dataformatas="p" ... >
JavaScript

p = object.dataFormatAs

Property values

Type: String

text

Default. Data is rendered as text.

html

Data is rendered as HTML.

localized-text

A Windows Store app using JavaScript versions. Data is rendered using the locale settings of the client machine.

Remarks

The dataFld property is not available on param objects; use getAttribute('dataFld') instead.

Examples

The following div example renders data in HTML format.


<div datafld="Column2" dataformatas="html"></div>

The following span example renders data in HTML format.


<span datasrc="#bank_acct" datafld="balance" dataformatas="html"></span>

The following textArea example renders data in text format.


<textarea datasrc="#customer" datafld="address" dataformatas="text" rows=6 COLS=60></textarea>

See also

button
div
input type=button
label
legend
marquee
object
option
select
span
table
Introduction to Data Binding

 

 

Afficher:
© 2014 Microsoft