Javascript examples for DOM HTML Element:Ol
The Ol object represents an HTML <ol> element.
You can access an <ol> element by using getElementById():
<!DOCTYPE html> <html> <body> <ol id="myOl"> <li>CSS</li> <li>HTML</li> <li>SQL</li> </ol>/* w w w .ja v a 2 s .com*/ <button onclick="myFunction()">set the list items to increment from the number "2" instead of "1"</button> <script> function myFunction() { var x = document.getElementById("myOl"); x.start = "2"; } </script> </body> </html>