Javascript DOM HTML Ol type Property set to use uppercase roman numbers

Introduction

Set the ordered list to use uppercase roman numbers:

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

Click the button to set the ordered list to use uppercase roman numbers.

View in separate window

<!DOCTYPE html>
<html>
<body>

<ol id="myOl">
  <li>CSS</li>
  <li>HTML</li>
  <li>Java</li>
</ol>/*from  ww w .  jav  a2s .  c  om*/



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

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

</body>
</html>



PreviousNext

Related