value attribute | value property

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
1 out of 1 rated this helpful - Rate this topic

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

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.