Javascript examples for DOM HTML Element:Li
The Li object represents an HTML <li> element.
You can access a <li> element by using getElementById():
<!DOCTYPE html> <html> <body> <ol> <li id="myLi">CSS</li> <li>SQL</li> <li>HTML</li> <li>XML</li> </ol>//from w w w . j a va2 s . c o m <button onclick="myFunction()">set the list items to increment from the number "3" instead of "1"</button> <script> function myFunction() { var x = document.getElementById("myLi"); x.value = "3"; } </script> </body> </html>