Javascript examples for DOM HTML Element:Ol
The start property sets or gets the start attribute of an ordered list.
Set the start property with the following Values
Value | Description |
---|---|
number | Sets the start value of the first item in the ordered list |
A Number, representing the start value of the first list item in the ordered list
The following code shows how to Set the start value of the ordered list to "75":
<!DOCTYPE html> <html> <body> <ol id="myOl" type="I"> <li>A</li> <li>B</li> <li>C</li> </ol>//from w w w . j a va2s.com <button onclick="myFunction()">Test</button> <script> function myFunction() { document.getElementById("myOl").start = "5"; } </script> </body> </html>