Ol start Property - Return the value of the first list item in the ordered list: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Ol

Description

Ol start Property - Return the value of the first list item in the ordered list:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<ol id="myOl" start="50">
  <li>A</li>
  <li>B</li>
  <li>C</li>
</ol>// ww w  .j a v a2s .c  om

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myOl").start;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials