Javascript DOM HTML Ol type Property set to use uppercase alphabetical letters

Introduction

Set the ordered list to use uppercase alphabetical letters:

document.getElementById("myOl").type = "A";

Click the button to set the ordered list to use uppercase alphabetical letters.

View in separate window

<!DOCTYPE html>
<html>
<body>

<ol id="myOl">
  <li>CSS</li>
  <li>HTML</li>
  <li>Java</li>
</ol>//from   w ww  .  ja v  a  2 s. c om

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

<script>
function myFunction() {
  document.getElementById("myOl").type = "A";
}
</script>

</body>
</html>



PreviousNext

Related