I have:
const items = document.querySelectorAll('#players li');
console.log(items[0], items[1], items[2]);
<section id="players">
<h1>Players</h1>
<ol>
<li>Alice</li>
<li>Bob</li>
<li>Cesar</li>
</ol>
</section>
Producing:
Players
1.Alice
2.Bob
3.Cesar
Now I want convert the integers to Roman numerals, using javascript, externally in my javascript file, instead of setting the numerals in the HTML-file, like this:
<ol type="i">
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol>
This is my Javascript code so far, but I want to to convert the numbers to numerals:
const items = document.querySelectorAll('#players li');
console.log(items[0], items[1], items[2]);
type="i"the code is :document.querySelector('#players ol').setAttribute('type', 'i')list-style-typetoupper-romanin CSS.colorto set it's value so it turns red?(c#00)