EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

value attribute | value property

Sets or retrieves the value of a list item.

 

Syntax

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

p = object.value

 

Property values

Type: Integer

the value of the item.

Standards information

Remarks

In an ordered list, the value is the number that precedes the list item. Changing the value will change the visual numbering of all following list items. In an unordered list, the value is initially zero. Changing the value has no visual effect on the item.

Examples

This example sets each line item's value to an integer string.


<ol>
<li value="1">One</li>
<li value="2">Two</li>
<li value="3">Three</li>
</ol>

See also

li

 

 

Mostra:
© 2014 Microsoft