Ol type Property - Return the kind of marker used in an ordered list: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Ol

Description

Ol type Property - Return the kind of marker used in an ordered list:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<ol id="myOl" type="I">
  <li>A</li>
  <li>B</li>
  <li>C</li>
</ol>/* ww  w .jav a 2 s .  c  om*/

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

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

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

</body>
</html>

Related Tutorials