how to get value of li tag which is in ul tag using getElementById

In this code I am getting in alert 0 insteadof ‘abc’

  <ul>
            <li>First Node</li>
    <li id="repoFolder" value="abc">Lazy Node</li>

        </ul>
        <button onclick="rootFolder()">Click Me</button>

        function rootFolder(){


            alert(document.getElementById("repoFolder").value);

            }


Source: javascript

Leave a Reply